Programming Languages at a Glance | ||
---|---|---|
Prev | Chapter 24. Thoughts |
The syntax of programming languages mainly seems to be a matter of taste and habit. Lisp's minimal syntax with the equivalence between code and data still provides unmatched extensibility (just compare meta programming in C++ and Lisp), but suffers from readibility. Learning the basic syntax is simple, but keeping the thousands of forms in mind (without supporting syntax) is hard.
Using whitespace as part of the syntax (Python, Haskell), seems to cause too much of a (useless) debate. Personally, I think that Eiffel (apart from the bang-bang syntax for instantiation) has the most readible syntax of the "conventional" languages.
A simple means to avoid repetitive definitions of function is a flexible handling of arguments. In respect, Python stands out with its support of default arguments, named arguments, variable arguments lists and arbitrary keyword arguments. Combined with the (relatively new) syntax to apply a function to an argument list and keyword argument map, there is not room for improvement left. Among the other languages, Lisp probably comes closest. It is surprising to me, that Java and C# did not keep C++'s default arguments (VB.NET does support default arguments).