This week's book giveaways are in the AI and JavaScript forums.
We're giving away four copies each of GANs in Action and WebAssembly in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of GANs in ActionE this week in the AI forum
or WebAssembly in Action in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

Who came First?....Compiler Or Language?

 
Ranch Hand
Posts: 765
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guyz,
Well i have just started my course of Compiler Designer.Ultimately a question raised in my mind that "Who came first?...Compiler Or Language?".This question is much same as "Who came first?...Hen Or Egg?" .
Bye,
Viki.
 
High Plains Drifter
Posts: 7292
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think there's any question that a language, along with an interpreter (in the form of a CPU) were the first. Compilers come much later.
 
Leverager of our synergies
Posts: 10065
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hm... I do not see these two questions as similar. The language is first, naturally. When you build a compiler, you build it for some specific language.
The language can exist without a compiler, in a state of formal specification, but compiler without a language...
More interesting question could be asked regarding natural languages. What came first: English or people that were able to understand it?
 
Vikrama Sanjeeva
Ranch Hand
Posts: 765
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
If you consider the primary work of Compiler & interpreter then both are same..i.e converting source instruction/s into target.
I agree with Marraputa that this is not much similar to the question like "Hen Or Egg?".
There is only two possible answers of this question.One is Compiler came Firts & Second is Language came first.
Consider the Second one:-
If Language came first then the first compiler will be written in language and thus compilers are programs, therefore to compile the fisrt compiler there should exist some compiler.So from where that compiler came?.
Consider the First one:-
If compiler came first then there should exost any language in which compiler should be written.
Conclusion:-
I believe that language came first.But can't get any robust reason for the answer.For this I am searching any good compiler discussion forum like javaranch for Java & Related technologies.
Bye,
Viki.
 
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The language had to come first. What would the compiler do if there was no language defined for it to compile?
 
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Assuming that you are college kid. Do you know what is an Assembly language?
 
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Whenever a new programming language is written, a compiler is developed for that language using a procedure known as "bootstrapping".
When you use bootstrapping, you start out by writing raw machine code in hexadecimal (called as assembly language) for your compiler. That is you implement a compiler which implements only a subset of your new language using assembly language and then through a series of incremental steps, you write a compiler which implements your complete language syntax using the compiler that you just wrote using assembly language. That explains why the procedure is called as "bootstrapping".
Hope this helps.
Shashank
 
Michael Ernest
High Plains Drifter
Posts: 7292
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's a good point: in the development of new languages, the process is often alternated incrementally as described.
I took the question to be on the origin of computing. There's no compiler necessary when you write directly to the instruction set of a processor. The set of all instructions is a very primitive 'language' but it is a language nonetheless.
Some languages still have no language at all, just an interpreter (a program has been compiled, but does not compile anything). Perl, ksh, csh, BASIC, tcl/tk, that list goes on and on.
Compilers are a (huge) convenience, of course, but computing is possible without them.
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Tracy Woo:
Assuming that you are college kid. Do you know what is an Assembly language?


Forget Assembler - first came Machine Language .
Actually I still support code in Assembler / ALC. < sigh >.
 
Ranch Hand
Posts: 776
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For assembler the language is first.
The hardware guys design a new machine (an 80x86, S/360, PDP8, Univac 1108, Z-80, whatever). This includes registers, processor status, paging/segmentation hardware, etc. etc. etc. ........
Part of the result is a specification for a machine language (instruction set description).
Where does the assembler (a compiler) come from?
In the old days it would indeed have been bootstrap coded at the machine language level (instructions coded at the binary/octal/hex level).
These days? Well, a simulator would be used, coded in some useful and relatively high level language. C, C++, Java, COBOL, FORTRAN, BASIC, .... are all possibilities but the fact is, there are languages that are specifically designed to simulate implementation of new architectures at the instruction level. Still a 'bootstrap' process, 'tho ........
Regards, Guy
 
I'd appreciate it if you pronounced my name correctly. Pinhead, with a silent "H". Petite ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!