Reply to comment
Knowing syntax and semantics versus knowing standard functions
Recently someone was making a claim that semantics and syntax are by far the most important parts of knowing a language, I have to say I disagree almost completely. Knowing syntax and semantics of a language is almost useless — for instance I can write you some python (I am familiar with the syntax, definitions, indentation, etc.), but I could hardly implement a common search algorithm that I could implement in C, or heck even assembly. When you start learning a language the semantics and syntax are important. However, they very quickly they become intuitive and therefore unavailable to the conscious thought process; one essentially starts thinking in code and not the syntax or the semantics. As one rewrites code to make it cleaner, one develops a preference for structure that keeps the code clean. Therefore, to see code which is not in line with the intuitive knowledge that the programmer possesses about his tools, is both painful and ugly.
It is called meta-cognition, when one first starts learning a language those useless details are very apparent as the program will not even compile unless one gets the syntax and the semantics right. However, as one becomes more adept, those details vanish to a point where one doesn’t think about it, it's naturally there. That is to say that the most elegant expressions of the language, the cleanest, most aesthetically pleasing expressions, became the actual language.
Standard libraries and functions have become very important just as one’s command of grammar becomes important when attempting to express one’s self succinctly.
However there are exceptions. There are programmers who know valid syntax, but do not know that language completely; for instance if a programmer doesn’t know how to use the ternary operator, then his expressive power will be limited and that will add more lines to the code and make it less aesthetically pleasing. However, I don’t find this to be common in programmers who write and rewrite their code, because they soon will run across an example in someone else’s code and when trying to maintain clean code will switch over to more expressive expressions.
In essence productivity is often tied to speed and experience. That is to say how to write code quickly and how to avoid making mistakes, especially design mistakes. That is not to say that speed doesn’t kill, it does, but not often in the hands of an expert. Without knowing standard functions and libraries, there is really no way a person can have speed or experience as they go hand in hand with knowing standard functions and libraries of a language.
These days with editors like Eclipse, you cannot write incorrect syntax, period. So when a mistake is made it will tell you, and after a short while of correcting your mistakes, it becomes intuitive. Eclipse will also auto-complete your functions, but without knowing at the very least the letter with which the function starts the auto complete it useless to you.
There are exceptions, for instance if one is hiring an individual to write a compiler, and then do ensure that the programmer is well versed in every aspect of syntax and semantics of the language. But short of a compiler, syntax and semantics are literally the bare minimum and if anyone knows how to use the standard libraries or functions adeptly then it’s more than likely, that they know the syntax and semantics well enough.




