News for hackers. Stuff that matters.
Re:Syntax is the last thing you should design by kazinator on Monday March 06, 2017 @12:45PM (#13804410)
OK: let's go with: design syntax any damn time you feel like it. Design it first and put finishing touches on it last. Design it while brushing your teeth or going to work, etc.

Don't give up too easily on Lisp. It also has picked up various syntax which has leveraged people's abilities.

As an exmaple, the backquote notation. Without it, it would be very painful to write macros at just one level of expansion. There is tremendous value in being able to do `(a b c (,@foo)) and so on, and it is a character syntax, like infix.

The possibilities for adding notations to Lisp without disturbing its syntax are not exhausted.

In my own Lisp dialect, I have introduced a modicum of notations which make quite a difference:

   obj.slot.a.b.c   ->   (qref obj slot a b c)

   obj.bar.(method arg)  -> (qref obj bar (method arg))

   a..b  ->   (rcons a b)   ;; construct range object

   [seq from..to]  ;; slice

   (fun arg . rest)   ;; dot notation with atom serves as apply

   (. blah)  -> blah  ;; dot not preceded by anything reduces to atom

   #"word list literal" -> ("word" "list" "literal")

   `quasi @literal @{blah[3]}`
All such little things make the "little code" you write daily a lot nicer.

It's understandable that coders might be put off by verbiage like (concatenate 'string ...) or (slot-value obj 'slot) or (aref array index).

Re:Syntax is the last thing you should design by vidarh on Tuesday March 07, 2017 @02:45AM (#13808905)
> Don't give up too easily on Lisp

You assume I gave up on it easily. I didn't. I simply found nothing important enough to keep suffer the syntax. Not because there's nothing of value in Lisp, but because most things of value have been copied by many other languages by now. I'm not saying that Lisp doesn't have value any more, but that what it provides that other languages doesn't is not sufficient to outweigh the inconvenience of the syntax to me.

> The possibilities for adding notations to Lisp without disturbing its syntax are not exhausted.

The problem with this is that while you can do it for yourself, until/unless it gains traction you still need to deal with the surrounding ecosystem too.