[racket-dev] P4P: A Syntax Proposal
IMO, this thing is missing the point (the usual "parens, ewww!" one),
as long as it ignores infix. I was contemplating some examples that
would demonstrate this nicely, and then I saw this:
On Jul 28, Shriram Krishnamurthi wrote:
> deffun: d/dx(f) =
> defvar: delta = 0.001
> fun: (x) in
> /(-(f(+(x, delta)),
> f(x)),
> delta)
>
> defvar: d/dx-of-square = d/dx(fun: (x) in *(x,x))
> =(round(d/dx-of-square(10)), 20.0)
> =(round(d/dx-of-square(25)), 50.0)
which (again -- IMO) is barely readable for people who know a little
about sexpr syntax, and probably completely unreadable for most
people.
(And, of course, doing infix gets a whole bunch of heavy stuff in --
the redundant parens, stricter syntax for identifiers, etc; I have
high hopes for the honu reader.)
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://barzilay.org/ Maze is Life!