3 ms·
The parens are a cue so that the editor indents my code properly. How do you propose to make emacs auto-indent sweet expressions? It seems that I would have to
by ohyes 16y ago
The parens are a cue so that the editor indents my code properly. How do you propose to make emacs auto-indent sweet expressions?
It seems that I would have to manually do that as indentation would convey meaning.
Whitespace is a notorious pain in the ass to get right, parens are visible, countable, and highlight-able.
Infix is stupidly ambiguous and is the cause of multitudes of errors; a 'natural' way to describe math or not. (There is a reason some prefer the reverse polish calculator).
Anyway, I don't 'get' the 'aversion' the syntax is trivial to explain and it keeps me from having to remember fiddly rules. Use a proper editor to indent/highlight/reformat, and it is as good as any other syntax.
(If you want Lisp to be popular, just get Justin Beiber to write a song about it).
- Xuzz 16y agoPeople claim the same issue with Python, but I don't think it's really hurt anyone much. It's usually very obvious and auto-indent is surprisingly possible on a lot of it.
- cturner 16y agoI agree that sexpr are the best syntax out there for a language because it's consistent and simple. However, this expression thing is a good idea. I've been waiting for something like this for a while. Anyway, I don't 'get' the 'aversion' the syntax is trivial to explain [etc] Although you mightn't get it, I'm sure you have run into it a bit and realise it's widespread. Perhaps nine in ten people who identify as programmers would dislike it. The practice of ignoring that hasn't done any favours for lisp takeup. It's still a fringe language. Like the author says, But most software developers have abandoned Lisp precisely because of Lisp's hideous, inadequate notation This syntax is a gateway that allows you to smuggle lisp into a workplace. It looks like python. When people ask about what you're doing you say "Oh, that's this cool language called Racket. As you can see, it reads a lot like python, but I've found it allows me to do xyz nicely. Here, let me show you how this script works." Then you would show them the script, perhaps show them a repl tool that appears to work just like python's and they'd be able to get around your your scripts as much as they can around your existing python code. Sweet! How do you propose to make emacs auto-indent sweet expressions? You could have emacs auto-transform into sexpr when you loaded a file, and save to sweet expressions when you saved. Should be trivial. From your perspective, you could like in a sexpr world. Except when you were stepping your colleague through the code - remember to vi for that bit. Otherwise the game will be up.