2

I'm a computer engineer and all the courses we have had about programming and computer languages were an introduction to C/Java and OOP. Now I feel like reading Java language specification to learn a deep understanding on Java language but I understand that there are something like grammar description in the specifications which I have no idea about. What should I study to be able to understand a programming language deeply(Especially specification elements such as grammar)? Have I missed some computer science courses? or I should understand all intuitively?

I was pondering about reading some books about compilers but I thought it'd be better asking it from the experts!

user1892555
  • 311
  • 1
  • 2
  • 5
  • 2
    Learn BNF, it's simple and it's the most widely used way of defining language grammars. https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form – SK-logic Nov 23 '13 at 15:07

1 Answers1

3

Study a programming language as you would study a spoken language. Grammar is important, and you can learn that from the formal specification of the language, but grammar only goes so far. Vocabulary matters too - actually, more. Every programming language has its collection of "words" - Java's Base Class Library, Lisp's common functions, C's Standard Library, etc. But even practice with vocabulary will only get you so far. Every programming language also has its idioms, and being able to use those well is the mark of a native speaker.

Ross Patterson
  • 10,277
  • 34
  • 43
  • Now I think that I don't need to read the specifications and instead of that I'd better dive in JavaEE, learn Haskell & scala and try to involve me in as many serious development projects as I can. – user1892555 Nov 23 '13 at 18:07