8 ms·
With Rust do you close all your } manually? Do you have an example of Rust code where the equivalent Lisp code would be harder to parse, assuming equal familiar
by brlewis 3y ago
With Rust do you close all your } manually? Do you have an example of Rust code where the equivalent Lisp code would be harder to parse, assuming equal familiarity with both languages?
- HexDecOctBin 3y ago> With Rust do you close all your } manually? You don't have to, because you don't end up with }}}}}}}}} in Rust, because statements end with ; and not }.
- brlewis 3y agoI didn't end up with ))))))))) in Scheme because it was easy to create smaller functions. I do see rust ending with } } } In TypeScript I'll often find myself ending blocks of code with }); } }); } I'm having fun with TS, but I do miss the parentheses. They were simpler.
- HexDecOctBin 3y ago1. Lots of small functions lead to code in which bugs often hide in plain sight, see this old memo by John Carmack: http://number-none.com/blow/john_carmack_on_inlined_code.html http://number-none.com/blow/john_carmack_on_inlined_code.htm... 2. Scheme is better than Common Lisp when it comes to Lots of Irritating Superfluous Parenthesis, since declaring a variable in Scheme (using 'define') doesn't create a new nesting like it does in Common Lisp (using 'let').
- IshKebab 3y agoI do, but there are about 4x fewer }'s in Rust than there are )'s in Lisp. Look at these: https://rosettacode.org/wiki/Archimedean_spiral#Common_Lisp https://rosettacode.org/wiki/Archimedean_spiral#Common_Lisp https://rosettacode.org/wiki/Archimedean_spiral#Rust https://rosettacode.org/wiki/Archimedean_spiral#Rust