I've found that I have a hard time thinking in Microsoft. I can think in C, C++, Smalltalk, Java, Bourne, BASIC, Perl, LISP, and any kind of scripting you could care to name. But, hand me C#, VB, J, or any of the other language Microsoft has designed in the last ten years, and I just can't hack it. Well, I can, but it just seems ... the long way
(
Read more... )
Reply
Badly written programs will have badly written bugs, of course. Because LISP macros are literally programs unto themselves, badly written macros will have badly written bugs. But, there are ways (actually, it's ( ... )
Reply
Making macros Turing-complete, even making them expressed in the host programming language, does not make them first-class citizens of the programming language. It does make them far more powerful and far easier to write.
Here's another example of the second bullet point: static analysis. Your generic static analysis tool will operate on the fully-expanded syntax; how do results get mapped back onto the source syntax? There are workable approaches, but it's not a simple problem.
Reply
I just really prefer writing code that says exactly what it does. I can't do that with C. I can write something pretty close to english in LISP, and get what I want done. That's made possible by the openness and simplicity of the LISP macro system.
I like your comment that addressing these problems is in the arena of the development environment. LISP images are the development environment. The ( ... )
Reply
The Visual Studio languages you were discussing were the ones MS introduced (C# & VB); that comment really only applies to them, and not to Visual C++, which has the worst of both worlds.
.NET 2.0 does a much better job than 1.x on runtime code generation & compilation, but 1.x could do it, and the XmlSerializer class, among others, has used that extensively since 1.0. What the MS .NET languages lack is a syntax-quote mechanism to make runtime code generation & compilation easy, akin to LISP S-expressions & eval.
Reply
Leave a comment