5 ms·
I once wrote a tiny DSL language. I used LISP (S-Expressions with parenthesis) because it semantically fit and made the parser much easier to write. I was laugh
by sirsuki 3y ago
I once wrote a tiny DSL language. I used LISP (S-Expressions with parenthesis) because it semantically fit and made the parser much easier to write. I was laughed at and ridiculed by my peers. Everyone hated it that I had to attempt two other language styles just to compensate.
I had a chuckle seeing fe syntax is LISP like and I was like “See? I’m not the only one.” Many just can’t give LISP and S-Expressions their due regard. Same for Reverse Polish Notation. I was born on the wrong planet.
- drpixie 3y agoI love RPN for calculating - I still regularly use a HP11C (Swiss Micros replica). But I hate coding or reading prefix (list) or postfix (rpn, forth, etc) languages. Once wrote a substantial project is Postscript - works fine but note easy on the brain. Guess it comes from just too much familiarity with infix notation!
- packetlost 3y agoI personally find prefix and RP notations to be pretty easy to read, but writing is harder for me. I've introduced bugs into FORTH programs because I did a + b instead of a b + out of habit. I think both notations have their place and not everyone will be able to make the switch
- nine_k 3y agoThere are Lisp macros that allow writing infix arithmetics. Even fe is said to support macros.
- lelanthran 3y agoNo you weren't, many of us, like myself, have designed small languages over the years. After a few of these, you stop designing syntax: you just skip the syntax and directly read ASTs instead of whatever syntax you wasted your time on. My next language is going to be a FORTH of some type .
- carapace 3y agoI worked with Joy for some time and came to the conclusion that syntax is a MacGuffin.
- packetlost 3y agoI don't think it's worth making a FORTH unless you plan to build an optimizing compiler better than what iForth, gForth, or VFX have done, open source and maintain it, or exclusively target microcontrollers. FORTH is a great "language" but the ecosystem is tiny and the tooling is pretty minimal.
- lelanthran 3y agoWell, yeah, I hear you. But consider that I didn't make lisp-like languages because I didn't find anything suitable. There were (and still are) lots of nice Lisp implementations when I made my variations over the years. It's the same with any language created by a single person: we aren't doing it so that we can use it in production (that's a bonus, if possible).
- packetlost 3y agoFair enough!
- hoosieree 3y agoI thought part of the reason people use forth is because they don't need or want the dependencies and complexity of a big ecosystem or lots of tooling.
- baq 3y agoYou’d be hailed as a genius if you replaced s-expressions with yaml.
- deleted 3y ago[deleted]
- cpeterso 3y agoJohn McCarthy had the opposite experience: he originally planned to replace Lisp's S-expressions with a more ALGOL-like syntax called M-expressions, but other people liked S-expressions and he never got around to implementing M-expressions. https://en.wikipedia.org/wiki/M-expression https://en.wikipedia.org/wiki/M-expression