5 ms·
> After taking a compiler course in uni I found the emphasis on dealing with syntax mostly a waste of time. To begin with, do yourself a favor and use S-express
by lelanthran 3y ago
> After taking a compiler course in uni I found the emphasis on dealing with syntax mostly a waste of time. To begin with, do yourself a favor and use S-expression syntax (like Lisp) for your language. They're dead simple to parse. With the syntax out of the way, you can get to meat and potatoes of implementing a language. Later on you can always define a "look" for your language, and you can spend an inordinate amount of time on that.
I maintained same attitude for years.
I've changed my mind now. Anything feature I want already exists in some programming language. The only distinguishing feature I can offer when designing a new programming language is "very readable", so syntax matters more than I used to think.
Whether you get traction or not depends a lot on syntax - if your syntax is too much of an outlier compared to mainstream languages, your features don't matter.
- davidhs 3y agoMy suggestion was more for people who are starting out developing a programming language. It's the over-emphasis on the syntax so early on I find to be suboptimal. I also find that slapping on a more human readable or aesthetically pleasing syntax afterwards to be relatively easy.
- lelanthran 3y agoI agree, so much in fact, that this past weekend I wrote a program to translate s expressions to html. Because I got tired of writing my htmx stuff as a tag tree. I should probably post a show HN here.