
Sweet: An Alternative to S-Expressions - tosh
https://docs.racket-lang.org/sweet/index.html
======
daly
I have been programming in Lisp for 50 years, all the way back to a Lisp 1.5
version.

Every few hours someone decides to write lisp with a different syntax, one
that lacks parens. Yes, it can be done. No, it shouldn't be done.

~~~
brudgers
The Racket community's interest in programming pedagogy appears to be focusing
on extending the Racket ecosystem to better facilitate the creation of "infix"
languages, e.g. Flatt's recent remarks on "Racket2." [1] The Racket community
appears to be creating a world where students can make baby Python's using a
Lisp instead of vice versa.

To the degree that SICP is ground zero for Scheme dialects of Lisp extending
the Racket ecosystem with an eye on making diverse languages is in the central
current of Scheme's history of creating increasingly more complex
interpreters...there's nothing wrong with syntactic sugar. I suspect the goal
is to allow educators to express CS concepts in the context of Python without
all the noise of Python's incidental complexity.

[1]:
[https://news.ycombinator.com/item?id=20490423](https://news.ycombinator.com/item?id=20490423)

~~~
daly
If you don't like parens, don't use lisp. There are thousands of other
languages discovering things like "lambda" as if it was a new idea.

It is easy to create a domain-specific language on top of lisp if you want
something with a specific focus. But trying to create a full language that
hides lisp syntax is pointless. It's been tried SO many times and failed
exactly that many times. There is so much to lose.

You lose homoiconic syntax which usually means you lose macros. You can hack
macros by translating back to lisp, but why?

I can find hundreds of "lisp without parens", just do a google search. For
example, there is Wisp.

You can generate lisp "without parens" by a simple hack. Push all of the
parens to the right side.

(+ (* 2 3) 6) becomes (ignore the underscores. I don't know how to generate
verbatim text in HN)

_____________________________________(

+

_____________________________________(

* 2 3

_____________________________________)

6

_____________________________________)

Now if you "adjust your margins", all of the parens disappear off the page.

Lisp is a language that everyone says "I don't get it and I don't like it"
until.... they get it and then they LOVE it. That's when they learn the
limitations of all the other languages.

~~~
brudgers
The package's author is near the center of the Racket community.
[https://www.asumu.xyz/](https://www.asumu.xyz/) It lives alongside the Racket
DSL for Algol 60 [https://docs.racket-lang.org/algol60/](https://docs.racket-
lang.org/algol60/), Datalog [https://docs.racket-
lang.org/datalog/index.html](https://docs.racket-lang.org/datalog/index.html),
and ProfessorJ [https://docs.racket-
lang.org/profj/index.html](https://docs.racket-lang.org/profj/index.html) in
the Racket ecosystem.

------
tosh
c2 wiki:
[http://wiki.c2.com/?SweetExpressions](http://wiki.c2.com/?SweetExpressions)

