4 ms·
I'm not a huge fan of the scheme style programming languages although pretty standard even in Go templates because the parenthesis end up with ugly syntax that
by encryptluks2 4y ago
I'm not a huge fan of the scheme style programming languages although pretty standard even in Go templates because the parenthesis end up with ugly syntax that becomes difficult when using multiple levels, but Racket does seem cool. I found their guide on building web apps to be pretty amazing and I think that is what HN uses for their website.
- stingraycharles 4y ago> the parenthesis end up with ugly syntax that becomes difficult when using multiple levels This is really something you will get used to very quickly, and dare I say, learn to appreciate.
- esjeon 4y ago> learn to appreciate. I don't think so. AFAICT, people do hate parenthesis, no matter how long they use Lips/Scheme. They just simply get used to the clutter. Also, when writing code, you can spam ")" to close functions/expressions. It takes only few brain cycles if the editor highlights matching parenthesis. This makes it easier to move code around. Copy-paste-))))))...
- phyrex 4y agoYou’re wrong in both points
- thrown_22 4y ago>I don't think so. AFAICT, people do hate parenthesis, no matter how long they use Lips/Scheme. They just simply get used to the clutter. People see trees and not parens. People who complain about parens are still stuck in the "code is text" mind set rather than the "code is a tree" mind set. >Also, when writing code, you can spam ")" to close functions/expressions. It takes only few brain cycles if the editor highlights matching parenthesis. This makes it easier to move code around. Copy-paste-))))))... We've had editors since the 1970s that can take you to where a matching paren is closed. You then copy/paste the whole function without needing to add or remover parens.
- esjeon 4y ago> People see trees and not parens. Codes are still text unless you're using tree-based editors. Maintaining tree on text editors requires careful editing and strict practices, which human brains aren't good at. The "tree" will get broken at some point, but, in this school of thought, the recovery strategy is unclear and inconsistent at best. This becomes annoying pretty quickly. The real tree, at the end of the day, is formed by line breaks and indents, not parenthesis. Codes are also for human consumption after all. Now there are two trees to manage - semantic indentation and parenthesis - which is bad. Luckily we can induce parenthesis from the semantic structure, so we only care about the semantics, and naturally trailing ")" becomes completely redundant.
- thrown_22 4y ago>Maintaining tree on text editors requires careful editing and strict practices, which human brains aren't good at. The "tree" will get broken at some point, but, in this school of thought, the recovery strategy is unclear and inconsistent at best. We've had editors that automatically do that since the 70s. Here's a live demo hot from 1986: https://youtu.be/-J_xL4IGhJA?t=2416 https://youtu.be/-J_xL4IGhJA?t=2416 >The real tree, at the end of the day, is formed by line breaks and indents, not parenthesis. It isn't. You're not the type of person who lisp is for, which is fine. There are lots of languages suited for people like you. But I'd be curious to know what language you think uses nothing but line breaks and indents to describe its AST.
- esjeon 4y ago> Here's a live demo hot from 1986: https://youtu.be/-J_xL4IGhJA?t=2416 https://youtu.be/-J_xL4IGhJA?t=2416 The process in the video still perfectly aligns with my description. Actually, I reached that conclusion by observing people writing Lisp code. That is, when you're writing Lisp code, that's exactly what people next you would see, no matter what you think. Also, trailing ")"s are clearly a burden, as people do spend their brain cycles to properly match them. > It isn't. You're not the type of person who lisp is for You sound like you're right in the middle of Lisp fever, which is fine. Everyone goes through that. > But I'd be curious to know what language you think uses nothing but line breaks and indents to describe its AST. You simply didn't get what I was saying. Even when all the parens were stripped off from a Lisp code, you can easily reinsert parens based on line breaks and indents. So people rely more on indentations for correctly putting parens, rather than being cautions w/ every single editing operation.
- fredrikholm 4y agoHaving some more syntax for things like maps and destructuring (like Clojure) goes a long way to remove the worst offenders (((like these))), but as others have mentioned, you get used to it, and then you miss it in other places. You are working with shapes of data, not lines of text. Using tools like Paredit you can get into an incredible flow akin to that of Vi/Emacs mastery, with the added layer that you are moving entire blocks rather than single words (that may or may not end up being valid code).
- forgotpwd16 4y agoTo be more precise it uses Arc that is implemented on Racket. An example of the programming approach Racket provides (https://beautifulracket.com/appendix/why-lop-why-racket.html https://beautifulracket.com/appendix/why-lop-why-racket.html).