6 ms·
Seems cool. But I'm not convinced extensible languages benefit from adding a variety of syntactic forms. As your ability to extend the feature-set increases, th
by netbioserror 3y ago
Seems cool. But I'm not convinced extensible languages benefit from adding a variety of syntactic forms. As your ability to extend the feature-set increases, the need for a single regular syntactic form increases. Lisp may not be appealing to beginners because of its parenthesis, but they absolutely are what makes it work so well for its intended use cases.
Really, all use cases. I'm actually a fan of the parenthesis. Lisp feels like aesthetic perfection to me. Languages like Haskell and XL here just look like line noise to my brain.
- mapcars 3y agoThere are lisps without parens too, it's not strictly required for parsing and evaluation. I think the main purpose of parens is to highlight the syntax tree for developer manipulations with macros
- diggan 3y ago> There are lisps without parens too Are there any that come close to the usage of lisps with proper s-expressions? I've seen them come and go, but no "lisp without parens" that seem to stick around for longer period. I guess that should say something? Maybe we just haven't found the right way of exposing it though. Personally, when I've given it a try, the indentation-based syntax always makes it hard to use without faults. Maybe it's just a "getting used to" thing, but it seems like a mistake to depend on invisible characters for syntax. FWIW, I hardly ever write macros (mostly use Clojure/Script), so not sure the main purpose of the parens is macro writing for me. S-expressions with something like parinfer just makes programming a lot more enjoyable and easy, especially compared to all the C-syntax-like languages.
- tehologist 3y agoI am pretty sure logo is mostly a lisp without parenthesis. I find it a lot more readable than most lisp dialects. I am not sure why it never caught on.
- runlaszlorun 3y agoI was about to post exactly the same… haha. I’ve been doing a recent deep dive in languages as part of my own overly ambitious language attempt and only recently found out that Logo was in fact Lisp based. I’m guessing that the reason it might not have taken off is because, unfortunately, it was looked upon as a ‘kid language’. The goals of Papert and others seem a far cry from where tech has landed today. edit: for an egregious typo
- mbork_pl 3y agoIt is. A piece of trivia: AFAIR, you say SUM 2 3 in Logo to add two numbers, but [SUM 2 3 4] to add more. (Though I learned Logo more than three decades ago, so I might be mistaken.)
- samatman 3y ago> Are there any that come close to the usage of lisps with proper s-expressions? If you consider Julia a Lisp, which I would argue you should, it may be the most widely-used Lisp currently. The only way you'll see an s-expression is is to call Meta.show_sexpr. If you consider Dylan a Lisp, you should consider Julia a Lisp as well. If you don't consider Dylan a Lisp, I have to conclude that you consider the s-expressions to be part of the definition of a Lisp. Which isn't an unreasonable taxonomy, but isn't the one I use.
- diggan 3y ago> If you consider Julia a Lisp Maybe, but would you consider Julia a Lisp without parentheses, which was the context here? Because after looking at their documentation (https://docs.julialang.org/en/v1/manual/methods/ https://docs.julialang.org/en/v1/manual/methods/ for example), it seems to have as many parens as any other lisp, just postfix notation rather than prefix notation, `f(Float32(2.0), 3.0)` vs `(f (Float32 2.0), 3.0)`. Arguing about what makes or doesn't a lisp is a conversation I don't think will lead to any useful results, I feel like that's ongoing since the 60s or something. Out of my league :)
- samatman 3y agoGiven you said > lisps with proper s-expressions It's off-putting for you to fly in and pretend to be surprised that Julia uses parentheses in a way consistent with other languages which are syntactically Algolic. Apologies for expecting a serious conversation, didn't know who I was dealing with.
- diggan 3y agoThe root context of the conversation you injected yourself into, was about lisps without parens. It's OK to misunderstand, but please don't blame me for your own misunderstanding. Have a nice day!
- slooonz 3y agoIMO, there’s a wide unexplored design space between the minimalism of Lisp and richness of other languages. A programming language inspired by something like KDL (https://github.com/kdl-org/kdl https://github.com/kdl-org/kdl) has the potential to be in a very sweet spot between the two. "Everything is a node" instead of "everything is a list" is only slightly more complicated, but also vastly more readable that a soup of parenthesis.
- mbork_pl 3y agoWhere would you put Lua on this spectrum? Also, I do not find Lisp unreadable - you train your brain to ignore the parens and look at the indentation instead pretty quickly. And you can always tell Emacs to gray out the parens if you really want. ;-)
- slooonz 3y ago> you train your brain to ignore the parens and look at the indentation instead pretty quickly But I don’t want to train my brain to ignore useless syntactic noise, I want my brain to be guided by helpful syntactic guides.
- mbork_pl 3y agoGood point, but if you start treating indentation as part of the syntax, we all know where it would lead...
- agumonkey 3y agoyou heard of rhombus ? https://old.reddit.com/r/lisp/comments/1aw7jim/rhombus_a_new_spin_on_macros_without_all_the/ https://old.reddit.com/r/lisp/comments/1aw7jim/rhombus_a_new...
- shiandow 3y agoI'm starting to be increasingly certain that making a new (sub)language to express and solve your problems is the highest form of programming. You'd think the ability to define custom syntax would be the most important, but paradoxically lisp makes it a lot easier simply because there is no syntax.
- netbioserror 3y agoExactly this. In addition, I've found that in almost all Lisps, macros are a niche feature that are not needed to solve many problems; however, because the actual invocation of macros and normal functions is the same S-expression form, almost all Lisp programs end up as some sort of DSL. Especially when you have arbitrary heterogeneous data structures like Clojure. Instead of dealing with chains of single assignments as in older C-like languages, you've got a bunch of compact calls fully in-context.
- fiddlerwoaroof 3y agoSo, “there is no syntax” is one of those things that isn’t really true of most lisps: it’s more true to say they have programmable syntax and the default syntax is minimal.
- jll29 3y agoSure, Structure and Interpretation of Computer Programs (SICP) calls that "meta-linguistic abstraction", and there are many complex systems that contain a Domain Specific Language (DSL), or a complete programming language (e.g. E(macs)LISP). That is not much different from a mathematician that creates a new notation like "∞" or "∫_d_" because existing notation is capable but not convenient (to cluttered, shorthand needed to focus on domain concepts) for what needs to be done.
- runlaszlorun 3y ago> Lisp may not be appealing to beginners because of its parenthesis You may have been referring to Lisp beginners, as opposed to overall programming beginners, but I’ve heard anecdotally that overall programming beginners take to Lisp better than those with experience in Algol style languages. I could see that. And will prob be testung that hypothesis out soon. And I too have become a fan of the parentheses.
- netbioserror 3y agoI've always been curious about teaching total beginners Lisp. If the adage is true that learning a variety of languages will round you out in the long run, then experimenting with the S-expression, functional-lite model of Lisps as a first exposure should be low or zero-cost. And then we get to observe: If instead of modeling instructions and memory semantics, we first teach someone to model abstractions and computations, how do they think about programming differently even when eventually exposed to C and its lineage?
- cb321 3y agoThough the pool of students was biased towards those who excelled in high school which post 1980..1990 probably means some prior exposure (i.e., not your "total beginners"), this was a big part of the original idea behind SICP-6.001 at MIT. AFAIK, they gave up on that experiment 15 years ago and moved to Python: http://lambda-the-ultimate.org/node/3312 http://lambda-the-ultimate.org/node/3312 Being faculty / wordy, there is probably much written about it attempting to draw conclusions. There were definitely some "smart, but total beginner programmers" in the mix, although I don't know how scientifically separated the performance of the "two 'some's" might have been.
- runlaszlorun 3y agoRelatively recently I found the SICP lecture series on YouTube from the early 80’s. I’d read most of the book already but it was so much better with Sussman and Abelson teaching it. The audience for the series I’m thinking of is adult professionals- programmers I believe. And I’d heard they were from DEC or HP or some such. So in addition to the material itself, you have the blessed quirkiness of its two authors, alongside a whole lot of late 70s/early 80s attire and rudimentary graphics. Quite a feast… lol.
- wubrr 3y agoAgree about Haskell... as far as I'm aware there is actually no declarative/easily-readable definition of the Haskell syntax that is also complete, especially when it comes to the indentation rules, and the syntax is basically defined by the very (ironically) imperatively-defined GHC parser[0]. I prefer a syntax like in Pure[1], where the ambiguous, hard to parse indentation-based syntax is replaced by explicit semicolons (Yeah, you can use braces/semicolons in Haskell as well, but most code doesn't). [0] https://github.com/ghc/ghc/blob/master/compiler/GHC/Parser/Lexer.x#L2060-L2092 https://github.com/ghc/ghc/blob/master/compiler/GHC/Parser/L... [1] https://agraef.github.io/pure-lang/ https://agraef.github.io/pure-lang/
- Arelius 3y agoJust wanted to say, thanks for the link to pure... I've been thinking a lot recently about languages based on term rewriting and hadn't seen it somehow.