Hacker News new | ask | show | jobs
by tannhaeuser 983 days ago
I'm personally not a fan, but still am hesitating to point out that Scheme was, in fact, chosen as the language for styling and transforming SGML (DSSSL, still available as OpenJade), and I believe also Brendan Eich's first choice, presumably because of the DSSSL precedent. But then supposedly his bosses told him it has to be more like Java, at least in name.

I'm not a big believer in syntax (and think LISPy language will always remain niche, which is part of its appeal), but one thing I'd imagine is that LISP/Scheme could've helped to prevent the syntax excess that is CSS, simply because there were already plausible styling examples for eg. classic stateful recto/verso print formatting, and LISP's homoiconicity would've make CSS syntax look kindof gross.

2 comments

> and think LISPy language will always remain niche, which is part of its appeal

As someone who uses Scheme regularly and follows Scheme communities fairly actively, I think most people who use Scheme and other LISP dialects would disagree. People often (I think only half jokingly) talk about the possible "Utopia" we missed out on if LISP has won. The word "successful" is often used to refer to implementations or dialects based on how much use they have.

I think the fact that LISP is niche is actually a negative for most of the community, not part of the appeal.

I agree—if I could use Racket (first choice) or Common Lisp (second choice) and make use of the breadth of libraries available to Python, I'd be a very happy camper. Being niche, and what being niche implies about shared lift, is what keeps me from reaching for Racket all the time.
It would be outstanding if Racket could target a JS or WASM backend. I know there have been a couple of third-party attempts in that direction, but the last I checked they were all abandonware. If someone knows otherwise, please let me know!

That said, I've been following Hoot with interest. Can't wait until the non-experimental browser releases catch up.

You might be interested in Hissp, a Lisp with access to the breadth of libraries available to Python. https://github.com/gilch/hissp
IIRC DSSSL influenced XSLT. I personally consider XSLT an abomination.

Separately, your criticism of lisp syntax is pure bikeshedding, and depressing to see it brought up again and again here (and I'm not a lisper). If you can never see below the surface you're always going to be stuck at the shallow end.

As someone who loves Lisp syntax I have to say that for a programming language syntax is actually very important: it's how your mind interfaces with the fabric of the program you're working on. A syntax that doesn't fit your mind well will make it more awkward to translate your thoughts into code.
I never really realized how much syntax matters until I spent a lot time writing Racket.

I’ve learned Haskell, JavaScript (actually learned rather than the passing familiarity I had before), Smalltalk, and APL since then. The hardest part of all of them has been keeping syntax straight.

Things with very regular syntax like Lisps and Smalltalk were a breeze to get comfortable, but a significant portion of my time learning Haskell and APL were spent learning how to parse expressions and precedences in my mind’s eye. There’s definitely a bit of a “reading the Matrix” moment for both of them that you tend to forget after you get it though.

I’m not saying we should stop trying to develop novel syntax either though. Anyone that has ever tried to use the object system in Racket knows just how painful it can be to not have syntactic sugar for something important.

`(send object a-message anyone?)`

Fitting the syntax to your mind? That sounds... limiting. Seems better to do it the other way around.
It's like getting in the driver seat of a car and making sure that it's set to the correct distance from the wheel and pedals and adjusting the mirrors so you have good visibility. You could try and adapt to the car instead but it's gonna be uncomfortable and more likely to result in problems (though the problems you can have with a car are a bit more... immediate than the problems you can have with a programming language).
Syntax really is so utterly trivial. In my personal project I went for C# instead of Scala. C#'s syntax is more familiar to most people, but the functional programming facilities (essentially copied from Scala) are absolutely bloody awful compared to Scala. Anything a little bit complicated – just forget it.

Edit: The point I didn't make very clearly above was at the syntax is actually pretty much the same, the semantics due to type differences and limitations really screw things up.

How is it a limit when you can choose the syntax?