Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Mexpr Scheme

Name: Anonymous 2012-10-27 11:11

Hello /prog/.
I'm making my own Scheme-like language with blackjack and hookers. It slowly became nearly as ugly as common lisp, so I decided to look through original McCarthy papers and implemented alternative syntax: http://pastebin.com/fiJKvvMY
New syntax causes new problems. The biggest problem bugging me now is method call syntax. Originally method call looked like (method object ...) where method is an expression which returns atom or an atom itself. This allows to choose method at run-time.
New syntax requires to write object #method[...] with method explicitly specified at compile-time. That looks like a problem to me.
Any ideas how to improve syntax?

Name: Anonymous 2012-10-27 12:02

>>3
I do already use (nearly) clos-style method call in the base(sexpr) language, i.e.
(foo: bar args ...)
where "foo:" is an atom(or selector). The point is that I can write
((if foo foo: baz:) bar args ...)
in sexpr form to choose method dynamically, but can't write the same using new syntax. I have to write verbose
if[foo; bar#foo[args ...]; bar#baz[args ...]]
instead. In fact I still can write "{if[foo; #foo; #baz]; bar; args ...}" as list, but it is awful form.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List