5 ms·
The parenthesis issue is one that I simply cannot grasp, but have to acknowledge as true simply because so many programmers have voiced it. As far as I can tell
by blacktriangle 5y ago
The parenthesis issue is one that I simply cannot grasp, but have to acknowledge as true simply because so many programmers have voiced it. As far as I can tell there is no correlation between who has an issue with them and who does not. New programmers vs experienced, young vs old, bad vs good, it does not matter. Some programmers love them and for others they are a show stopper.
For me, until you demonstrate the same level of structural editing support and powerful macro system without S-expressions, you can pry my parenthesis from my cold dead hands.
- taeric 5y agoI think it is only true because so many insist it is true. Same reason python is "easy for beginners.". So much propaganda insists it that folks believe it must be so. Note, my hypothesis is essentially any language that folks insisted is easy for beginners could be easier. There is a certain difficulty that comes from thinking something must be difficult.
- pierrebai 5y agoPortraying widely held opinions as propaganda is quite counter-productive, bordering on denial. Given that you provide no reasoning one way or another, I cannot say more about your personal views, but... Denying Python's simplicity is surprising. Clarity of syntax, avoiding superfluous tokens, and ordering of code in speak-order are a few of the reason for it's simplicity. Interestingly, Python fails at syntax clarity exactly where it adopts functional-style construct: list-comprehension for example. Like it or not, a language, like Lisp, which insist on polish notation is just unnatural, at least for most western speakers. (I don't know any spoken language that would map to placing verbs first in a sentence.)
- anaerobicover 5y ago> (I don't know any spoken language that would map to placing verbs first in a sentence.) There are some less spoken, and some more widely spoken languages have this as an optional possibility. Verb-Subject-Object order: https://en.wikipedia.org/wiki/Verb%E2%80%93subject%E2%80%93object https://en.wikipedia.org/wiki/Verb%E2%80%93subject%E2%80%93o...
- taeric 5y agoThis is silly. All programming is already in the same order for anything not math. And even math has plenty of prefix usage. Sigma, gamma, etc. So, I should use another term than propaganda, as that is negatively loaded. Consider it, rather, effective marketing. Edit: and apologies on dodging the point on python being simple. I really don't know how to respond on that. I still fight heavily to read most python I am exposed to, as it would be way easier in sql for most of the etl I see.
- oblio 5y agoMany (most?) programmers don't like (formal) math.
- bsder 5y ago> Same reason python is "easy for beginners.". So much propaganda insists it that folks believe it must be so. Python's grammar really does seem to be significantly easier that just about everything else. Someone on HN mentioned an article in which there were a bunch of graphs of the grammars of various languages, and Python was just obviously smaller and cleaner than everybody else. Hopefully someone with a better memory than I will relink it.
- taeric 5y agoThis feels like a somewhat dubious metric, all told. For one, complexity of language says little about complexity of programs made in language. And, that is usually more influenced by age of the code base with how many are contributing to the code base. Still, if you find the article, is be delighted to see the argument being made.
- bsder 5y ago> This feels like a somewhat dubious metric, all told. The claim was: Python was easy for beginners. Certainly a simpler, more consistent grammar is easier for beginners. For me, I left Perl for exactly that reason. Python just seemed to "fit in my head" much more easily than Perl. Scalar vs List context is a PITA. > For one, complexity of language says little about complexity of programs made in language. True. But I can also tell you that I could come back to my Python code a couple months later and still understand it. That never happened with my Perl code. And, this really got put to the test when Python code I wrote 15 years ago came back home to roost. Yeah, I cringed at some of the ways I did things in the code (although probably I should be kinder to my younger self--it was Python 1 code chewing through nasty binary formats), but I could still understand it and debug it.
- taeric 5y agoI disagree that a simpler grammar makes it easier. And comparing to perl is amusing. That is famously a write only language. Easy to build quick text processing in, but about it. For older code, this is a point I give to lisp. Not only can I still read most older code, I can still run it.
- zelphirkalt 5y agoSome say that with a "proper IDE" or with "proper editing support" this is possible for other languages too, but I ultimately doubt it, for all languages, which do not mark the beginning and end of their expressions and all languages, which consist of a mix of statements and expressions. The point is, that the parentheses make it unmistakably clear, where something starts and ends, which means, that an editor has no problem figuring it out. If a language has statements and blocks and expressions and whatever else there is, but not delimited by tokens like parentheses, then there will be ambiguity. That ambiguity cannot be removed and hinders how good an editor can be at selecting exactly that portion of the code, that you want to select and possibly move or wrap in something or do whatever with. Some languages replace such parentheses tokens with a "begin" and "end" keyword for example, but imagine what it would look like, if you had to use "begin" (5 characters) and "end" (3 characters) for really everything, for which parentheses in lispy languages are used. Now that would be a syntax nightmare.