Redefine DEFINE?

Started by Jeremy Dunn, January 30, 2008, 06:40:30 PM

Previous topic - Next topic

Elica

#15
Quote from: "Jeremy Dunn"(abs (ceil -3.4)) becoming (nest abs ceil -3.4)


By default I'm in brainstorming mode... and it works fine with few exceptions*... so excuse me if the idea is stupid, but Lisp alread has the exception, namely CAR+CDR=CADR, so ABS+CEIL=ABSCEIL etc. etc.



If you really want such feature, the translator may try to split unknown function names into known function names... automatically. But even in this case it might be good to have this functionality switchonable and switchoffable.







_________________________

[size=59]* One notorious exception is when my wife asks me "Who will pay for this?" If I remain in brainstorming mode while answering, a desaster happens. No kidding.[/size]

Jeremy Dunn

#16
Elica,



I don't know that I am breaking the LISP syntax at all unless you want to narrow it down. I have a function name "nest" that is followed by arguments and is enclosed in parentheses, I believe that is LISP syntax. The fact that I treat the argument : in a special manner may be unlispy to some but the overall form follows the pattern. Lutz also does this in the DEFINE function where he lets the comma be just another argument that is treated like I am using my colon. "Unlispy" forms are worth considering if they deal with often occuring structures in a more general way or provide some kind of conceptual clarity. I think LISP programmers are like abstract artists looking for that ultimate zen form of things. Other programmers just want to write code, lispers want to see the Om :)

Elica

#17
Oh, sorry for the misunderstanding.

I was talking about syntax breaking in the nest-less version.

I always like to see people experiment and find new applications of the tools they have...