quote: Original post by bishop_pass
This LISP statement: (+ (5 6)) adds 5 and 6 together.
However, (+ (5 6)) is also a LISP data structure. It is a list containing 2 items: + and (5 6). The first item is an atom or symbol, and the 2nd item is another list, containing 2 items: 5 and 6.
What is the significance of this? The program can disect it''s own code. It can actually determine what it is doing. It can also create its own code on the fly.
Whoa. I''ve argued for good reflective capabilities in my earlier posts, but this goes MUCH further than anything I had in mind. I agree, this could be very, very cool. But if you can start generating code at runtime, how does your app get compiled? Won''t this stuff induce a rather significant overhead? Not that we care about performance in this particular discussion, but still...
quote: Original post by Wilka
I thought it was a good idea, but not like the C/C++ one. It should be something that lets you write code that writes code. You can get a lot of funky stuff going with C++ templates, but the compiler errors are icky and there''s not way to properly debug it cos it runs when you compile it. And it''s not very readable when you complex stuff going on.
Sounds like an issue that could (again) be solved using reflection (see bishop_pass'' post!). If reflection can solve your problems, would you still want to have a similar compile-time mechanism such as templates?