Between DrRacket and Scribble, I am quite transfigured. The yak is clean shaved. This is everything I’ve ever wanted in a programming language but never known. It’s a little like love. 💕
I've used Lisps and I generally find they're fun, but it takes a lot of thinking to use, and reading lisp can be extremely challenging.
Moreover, of the lisps I've used, Clojure (for all its problem) is the easiest to read, not Racket.
@emacsen @emacsomancer The elegance appeals to me. That “everything is a list”, and everything works as expression. It just fits my cognitive style better, as a dilettante writer rather than “a coder”. I like the fluidity. I’m visually oriented so like the idea of DrRacket allowing pictures. And nesting everything including conditionals with brackets rather than opening and closing. I get distracted by the “yak shaving” of other langs. I’m just looking at this now, but liking it heaps.
There are debates around even the question of "What is a lisp?" - it's a topic that @cwebber and I may do a show on in the future (we started planning it then things got pretty crazy for both of us).
I agree with you regarding DrRacket.
I agree with you that Lisps are the purest form of languages and have an incredible beauty and elegance to them.
Now I'm going to knock Lisp...
Lisps are incredibly hard to read.
Look at the analysis done by ArneBab, and his resulting project Wisp:
SO much easier to read...
And "everything is a list" is, in practice, not such a great idea.
Compare a Racket define with a Clojure one:
(define (hi name)
(print (string-append "Hello " name)))
(defn hi [name]
(print (str "Hello" name)))
It's not just superficial, having vectors on the reader matters for other reasons
I've been a big proponent of Wisp, because I think an alternative simple syntax that maintains Lisp's beauty to be a big feature, but admittedly when I load lisp code and wisp code in my editor, I find lisp a *little bit* easier to read, but a *lot* easier to write. Wisp needs tooling to be made manageable.
And for myself, I would say "yes":
- Clarity of code flow
- Better editing tools (smartparens/paredit/rainbow delimeters)
- Unbeatable transition from "experimental code at the repl" right into your main codebase.
I like this take a lot and I love lisp syntax but I'll always be biased as it was the first language I wrote substantial programs in.
When you say clarify of code flow though, I feel like that speaks more to the simplicity of the evaluation model than anything else. (I.e. SICP chapter 1 stuff, no operator precedence, etc) Am I missing something or is that more a semantic than syntactic issue?
Flow is possible to reason about in general because it's clear where it is delimited. This allows for such things as putting a conditional during the argument list of a function call and have it be very natural:
(call-me (if (evening? cur-time)
Python can't handle that kind of thing and doesn't even try.
@cwebber @kingcons @emacsomancer @emacsen @Shufei that example has little to do with syntax; you can do that in Ruby and probably Smalltalk too. it's more a consequence of Python having statements instead of making everything an expression. (it's just that nearly every language that makes the mistake of having statements coincidentally has an algol-like syntax.)
@cwebber This seems to be honing in on it to me. "Everything is an expression" + parens as primary syntactic construct leads to the boundaries of an expression being obvious.
This in turn makes refactoring more obvious. You can get used to seeing "expression boundaries" in other langs too, but it feels exceptionally crisp in Lisp due to the "exposed plumbing" of the representation.
Actually it's almost always conditions which are the problem and "ternary operator" is available almost everywhere.
To me, a syntax must answer "yes" to one of two questions:
1. (For DSLs) Does it express specialized solutions that humans can understand?
2. (For multi-paradigm langs) Is it homoiconic?
If the answer is "no" to both questions, then I'd probably feel too limited in the host language over time. If the answer to #2 is "yes", then the syntax is probably going to look like Lisp or Rebol anyway. Once you know the benefits, it's easy to appreciate their form!
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!