by miloshh · 17y ago · 0 comments
Given that the only other "problem" in the post is a Hello World post, surely you aren't complaining that the author failed to include a "Hello World" lisp program? Well, here you go:
(print "Hello World")
I do not understand what you're saying at all.(Also, I'm not a lisper. In fact I'm increasingly of the opinion that it represents a wrong direction for the future of programming languages. So this is not a "pro-Lisp bias" thing.)
[1] Im not talking about implementations, obviously, Common lisp, scheme and clojure have their problems, im talking about the general idea of lisp.
As a skilled developer, I certainly prefer this philosophy to the Java philosophy of "If the feature might be abused, leave it out." (Obviously, I simplify that, but there's a lot of truth there.) But I don't think it's the right way to think of languages as we go forth, and I don't think it can scale as we go forward.
Instead of seeing languages in terms of what they permit, I see them in terms of what they deny. In particular, what invariants do they maintain? Now, that might seem an odd way of looking at it, but what it is is support for the next question: What do languages build on top of this invariant?
All the languages that I am currently interested in, and all the ones that I think provide the way forward, maintain invariants that Lisp does not let you maintain, precisely because it gives the Lisp programmer too much power. One obvious example: You can't "mutable lisp" your way into a language that has immutable variables all the time. If the language provides for mutation, even if you program in a strictly immutable subset of the language, your libraries, including your very base libraries that make up the "runtime", are likely to be mutation-based. (Getting around this might be possible but hardly worth it.) Erlang builds a huge runtime around having such pervasive immutability, and while mutable Lisps can borrow large swathes of Erlang's libraries and capabilities, they are incapable of providing a guarantee at the language level that no function you ever call will mutate a value out from underneath you. Erlang is a great example of building on quite a few invariants (read "programmer limitations") and producing things that are harder and/or impossible without them.
Another example: Type system. Lisp certainly lets you layer type systems on top of your language, but without enforcement by the language, there's a barrier as to how much you can take advantage of it. What the ML family does with types is not something you can add to a Lisp and end up with the same thing you get with native language support. You can come close, but there's a final level of integration or loop-closing (don't have a clean word for this concept) that you can not get to.
Smaller example: Haskell's laziness. You can add laziness constructs to a strict language (see also: Python generators), but you can not macro your way to a fully-lazy language starting with a strict one, at least not in any reasonable manner. (This feature excites me much less, but it's another example of something you have to start with.)
When the entire philosophy is about empowerment, you close the doors to a lot of things that can only be obtained by carefully-selected disempowerment of the programmer, most of which are fringe right now, but which I think will become more important over the future. Truly ultimate power only comes from assembler; languages give you their power by restricting the assembler they can generate.
In the single programmer case, especially the mature single programmer case, "more power" may be a great thing, but I think it breaks down pretty quickly as you get more people involved, especially as you get less-than-experts involved, and I think a lot of Lisp's failures to take over the world come from this basic issue, and some second-order effects.
What I want to close with is something I already said: Certainly, if I had to choose between a conventional Java-style B&D language or Lisp, I'd take Lisp. But the interesting action is occurring in the fields dominated by constraining the programmer: parallel programming developments, STM, immutability and/or banning shared memory, and potentially other interesting things that all involve first taking things from programmers, then building on the resulting invariants that things like Lisp or Perl or Ruby make a big point of not constraining you with. (I'm interested in type-safe string manipulations to ban XSS at the type level, for instance.) There are Lisps doing those things, but notice precisely that they have to be built in at the language level; you can't just macro your way to Clojure's STM. (And if that does happen to be how it is implemented, I'd run screaming; STM isn't very useful unless it is a very strong guarantee. And any connection with other JVM libraries will be very hard, too.)
In order to understand what is actually happening in any one part of a Lisp program, I may have to understand most of the rest of the program, if it is written in a particularly complicated way. This is usually never the case in Java.
I must have missed the memo explaining why static typing is always better. Can you forward it to me?
Lisp [is] stuck in the past...
You lose a little credibility here for not specifying which lisp you mean. I'll assume you mean Common Lisp because:
- Scheme is in the middle of reinventing itself after the R6RS unpleasantness, and that process could have any number of interesting repercussions.
- Clojure is very young, and already has a good chance of becoming the first mainstream functional programming language. I'll leave the value of that distinction unspecified for now, but it would be interesting.
- Some of the features available to Common Lisp programmers in the past really are impossible to duplicate today, and will probably remain so for the forseeable future. By all accounts, the system-level introspection and debugging capabilities available on Lisp Machines were a real treat to operate. We can reasonably disagree about how useful it might be to have OS, toolchain, editor, and system software all written in the same language and presenting a uniform interface, but I don't see how anyone could claim that ML and Haskell have surpassed Lisp on this point.
Check out the Haskell page on Music and Sound libraries and applications: http://www.haskell.org/haskellwiki/Applications_and_librarie...
That stuff might be useful, especially if you like curses user interfaces.
Compare that to some of the Lisp APPLICATIONS in that area:
OpenMusic: http://recherche.ircam.fr/equipes/repmus/OpenMusic/
PWGL: http://www2.siba.fi/PWGL/pwglconstraints.html
Common Music: http://commonmusic.sourceforge.net/
Symbolic Composer: http://www.symboliccomposer.com/windows/page_screenshots.sht...
Somehow the Lisp programmers haven't gotten the message that Lisp has been surpassed in all respects by Haskell - I wonder why that is. Do you have an idea why Lisp has cool applications and Haskell has curses-based MP3 player frontends?
ML and Haskell have certainly surpassed common lisp in some respects, but to say that they have surpassed all lisps in all respects has got to be some sort of sophistry.
Lisp is a form of syntax (and a few primitives like Eval and quote) that makes it easy to write programs that manipulate programs.
Common Lisp and Lisp 1.5 and Scheme and Clojure all have certain other things in common.
However, they have those things in common because they are generally recognized as being good things to have in a language for the purpose of programmer productivity. In no place is it written in stone that to be a Lisp, it must not use Hindley-Milner type inference.
I think you'll also find that most Lispers are chronic dabblers in programming languages, to say that I'm sticking my head in the sand when I choose to write whatever-it-is in Clojure is insulting.
> there is no good reason for a modern language to lack a powerful type system.
Lisps can and do have powerful type systems - you're confusing dynamic with none at all.
I'd love to see some modern SML or Haskell taking over the area of code compiled to binary, plus a constant growth of dynamic languages as well, because they are also cool. But that big revolution may not happen.
http://ecls.sourceforge.net/ecl-in-quake2.jpg
That takes care of the graphics, networking, matrix manipulation and low-latency. What other FUD do you need answered?
You might be able to do a serious graphics or high-performance computing project in Lisp. You will be the first one, and I'll be very interested in how it goes.
(print "Hello World")
The result I expected was: Hello World
The result I got was: "Hello World"
In the language we are using, the "Hello World" program is simply: Hello World
but, this is my anti-Lisp bias thing.Instead of print, try princ.
[1]> (princ "hello world")
hello world
"hello world"
The first unquoted string is the rendered display of the PRINT function, a side-effect. The second quoted string is the result, print returns the string it printed as a result.Try nesting them and see what happens: (princ (princ "hello world"))
You admit to having an anti-lisp bias without knowing anything about lisp. This whole "I hate it because I don't know it" thing is silly and unbecoming of good programmers.
It's naive to think that just because you're a programmer you know everything there is to know about the software industry. You don't. You know about a small fraction of the mainstream development tools, and even those, at a superficial level. For example, can you name the top software products for running local elections? how about automating a chemistry research lab? packages for oil exploration? vacation property management? real-time spoken Chinese processing? computational archeology? artist talent management? threat modeling for distributed corporate networks?
See? :-)
"Social" programmers, the guys you see in chat rooms and "community" websites are all mostly generalists, and typically work in well defined roles as grunt programmers. Nothing fancy, website here, a database there, a GUI or two, click, generate, zip, distribute, and call it a day type work. Don't let this closed echo-system define your perception of "the software industry".
Should I start reading EMACS source? Show me the code! If there's not at least one great open source project written in lisp, I'm not inclined to take your claims prima facie.
I wouldn't extrapolate beyond that. I don't know what languages are good for writing super-programs since I never wrote one. Super-programs are a small subset of all programs.
There're a lot more.
http://www.cyc.com/cyc/technology/whatiscyc
A large knowledge-based system with several hundred thousand concepts (classes) and millions of assertions (facts and rules).
Under development since 1984.