logoalt Hacker News

pfdietz • today at 3:48 PM • 2 replies • view on HN

Lisp macros let you do similar things, and you don't have to change the language itself.


Replies

tomsmeding • today at 4:02 PM

In ML family languages you also don't have to change the language for this, as function application is naturally "argument-by-argument" (the term is "curried"): the syntax is normally f x y z but (f x y) z and (((f)) (x)) y z are just as valid, and indeed f x y will be a function taking one argument. Thus |> can just take a function of one argument and be done.

bunderbunder • today at 3:54 PM

Maybe I've just been doing too much Racket lately and that's affecting how I view things, but it's real hard for me to not think of lisp macros as a mechanism for changing the language itself. Especially if it's something like a reader macro.

➕ show 1 reply