There's no such thing.
Also, Lisp is already perfect and beat us to it by decades.
(Yes, those two sentences derive a logical contradiction.)
I'm not a Lisp weenie. I haven't drunk the Kool-aid. But the Lispers are right in a lot of ways. When your language consists of a single uniform data structure which represents both code and data, you can do a lot of really interesting things.
My exposure to the D programming language has really opened my eyes as to the power of compile-time code generation and manipulation. Granted, string mixins and templates are just a hollow imitation of the power of true AST macros like Lisp provides. But it's made an impact on me nonetheless.
I can't shake the feeling that, no matter what the Lisp weenies say, the syntax of Lisp really has had an impact on its adoption as a mainstream language - that is to say, it hasn't been. It's probably more a product of the stigmas that have been associated with Lisp-style and C-style syntax since the early days of high-level programming. Lisp was way ahead of its time in a lot of ways, making it unusable for most programming tasks outside academia. C was made to be a low-level systems language. Thirty-forty years later, Lisp is still mostly in the realm of academia, and C-style languages still dominate the low-level end of the pool. For some reason, people don't seem to be able to take certain syntaxes "seriously" if they're used in a different realm than the realm in which their parent language was developed. You don't see many system-level BASIC languages in widespread use.
If we're to sell the benefits of Lisp to those who stick to C, then, we'd have come up with a syntax that is both palatable and familiar to them, as well as offering a lot of the benefits of Lisp-style syntax. A C syntax, but with a single unifying form with which all language constructs can be represented.
There's also the principle of "if it's different, it should look different" underlying the C syntax, something I wouldn't want to get rid of. The "omg parens" of Lisp aren't so much a problem with a sane (read: not Lisp-style) indentation and bracketing scheme, but even then it's still very difficult to pick out different kinds of operations when they're all represented with the same visual form and words. Mathematicians have a ridiculous amount of syntax to be able to compress ideas into tiny, elegant-looking formats. When you see a big sigma, you know that some sequence of numbers is being summed. It's much quicker to recognize than, say, (summation i 0 n (f i)).
No, I'm not really going anywhere with this. I'm just getting stuff down on.. paper. Screen? ..Internets?
Wednesday, January 14, 2009
Subscribe to:
Post Comments (Atom)
Lisp might be ahead of its time, but it's still a kind-of esoteric language. You might be able to do really interesting things with it, but are you also able to get The Job done in a reasonable timeframe? After all, programming languages are tools, and together with libraries and frameworks they build the basis of our profession - developing solutions for our or other people's problems. I'm not sure Lisp qualifies for that, and that may be why it has never made it into the league of mainstream languages.
ReplyDeleteOh, and it's a marketing and money issue, too, probably, I dunno. Are there frameworks for Lisp? Or say like.. database adapters, GUI, math, and-so-on libraries? I've never seen anyone posting a link on IRC or talking about a Lisp library on a blog. Seems weird to me.
I'm also not really going anywhere with this. Just teh intarwebs!
There are some fairly complex reasons as to why Lisp hasn't taken hold of the computing industry. However, realize, it IS starting to come back in vogue. There is quite a lot of chatter about it all over the internet.
ReplyDeleteYou are correct about the syntax -- it is fairly esoteric, and this is a problem. I think we'll see some future lisp make some syntax choices. The only reason lisp MUST have its syntax is for macros. But, we don't absolutely have to do macro programming that often.
I'm ranting, too.
"The only reason lisp MUST have its syntax is for macros."
ReplyDeleteI beg to differ. http://metalua.luaforge.net/
With a sufficiently simple syntax, the mapping from "pretty" syntax to a list-style representation of code is not that big of a jump.