5 ms·
Useless parentheses?
by AtNightWeCode 3y ago
Useless parentheses?
- WJW 3y agoThere are many parentheses, but they're hardly useless.
- AtNightWeCode 3y agoLove to meet you at a party! ;) Cheers!
- temporallobe 3y agoMy nickname for Clojure/Lisp is (parenthetical hell).
- shaunxcode 3y ago(nirvana (in hand))
- beders 3y agoSigh. How many parentheses does this have: myFn(x,y,z); vs. (myFn x y z)
- bmacho 3y agoThat's strawmanning. Indeed, function calling needs the same amount of parentheses. But literally every popular languages (C/C++/Java/Javascript) have syntactic clues for : - assigning values to variables - function definitions - denoting elements of structures - if, for and while control flow - fields of structs or objects - etc Which also play a huge role in structured/OOP programming. Less popular languages usually have syntactic clues for the important parts of their paradigm. Once I transpiled the example code from the Janet site[0] to Python (I don't speak Janet.) You can compare them, and count the parentheses, and the syntactic clues in general: https://news.ycombinator.com/item?id=34846516 https://news.ycombinator.com/item?id=34846516 [0] : https://janet-lang.org/ https://janet-lang.org/
- AtNightWeCode 3y agoJesus, it was a joke. The major diff is that with imperative langs you are not using functions as much as with functional programming langs. Even though in C# and other langs functional patterns becomes more and more common. Which is also my main criticism against functional programming langs. Functional programming is just a design pattern among others. Lispians will disagree. During the last 25 years I heard this garbage over and over that functional programming will take over. I worked at companies that invested heavily in some of the functional programming langs (like F#). All of them have been heavily crippled by it. If functional programming was so great it would have conquered the world by now. It has been around 4-5 times longer than smartphones. It is simply garbage. Practice and theory are two different beasts.
- sigjuice 3y agoIt is quite the opposite. Every pair is meaningful. Extra parenthesis cannot be added just for the heck of it without changing the meaning of the code.
- eimrine 3y agoTry Programmer Dvorak if you are too bothered with pressing Shift.