Lambda the Ultimate

inactiveTopic What I Hate About Your Programming Language
started 5/13/2003; 11:45:04 PM - last post 5/16/2003; 4:25:16 AM
Dan Shappir - What I Hate About Your Programming Language  blueArrow
5/13/2003; 11:45:04 PM (reads: 1886, responses: 13)
What I Hate About Your Programming Language
(from the LtU discussion group)

Matthew Markland points to an article on Oreilly's OnLamp site where chromatic discusses his likes, but mostly his dislikes, of various programming languages.

... looking at the popular languages for open source development today, there are many syntactic and otherwise superficial differences. At one level, all languages have a philosophical axe to grind. They exist for a reason. At another level, they're all just flipping bits and jumping around in a long chain of ones and zeroes. Everything in between is a matter of taste, and that's where most of the messy details go.
Posted to critiques by Dan Shappir on 5/13/03; 11:45:39 PM

Dan Shappir - Re: What I Hate About Your Programming Language  blueArrow
5/14/2003; 12:08:08 AM (reads: 1346, responses: 0)
Interestingly chromatic finds nothing to hate about JavaScript. As you may know, I love that languages, and yet I do find several aspects of it very annoying:
  • Variable declaration is optional. If you use a variable without declaring it, it's automatically added to the global scope.
  • Blocks aren't closures, they aren't even scopes. Instead, functions are a single closure/scope. That results in all sorts of annoying bugs, esp. for people like me coming from C/C++/Java.
  • There is no const keyword to complement the var keyword. I would really like to be able to declare constants.
  • No access specifiers for members. Everything is public. If you want to make something private you need to use tricks, like making it a variable in a closure.
  • No control over which members participate in enumeration ( for ... in ) and which don't. Nor any control over the order of the enumeration.
  • If you look at the three previous points together you see that what I really want it to be able to add properties to a value reference. JavaScript only allows adding properties to the value itself.
  • In member functions you must use this explicitly to access members, e.g. this.value, I would really like a shorthand notation, say .value
  • That fact the ending statements with a semicolon is optional adds ambiguities to parsing.
  • I would really like to be able to access closures as objects (like what Sjoerd does with Loell). This would make it possible to externally change values of lexicals, maybe even to play with the closure hierarchy.
Obviously changing JavaScript in these ways will break tons of existing code.

Chris Rathman - Re: What I Hate About Your Programming Language  blueArrow
5/14/2003; 7:50:58 AM (reads: 1264, responses: 0)
Pascal was a teaching language. C is portable assembly. Lisp is very much the lambda calculus. Perl is expressive glue.
I guess 3 out of 4 ain't bad, but something bothers me about everyone's attempt to pigeon-hole Lisp. Go back 10 years, and Lisp would be very much considered the language of 'Artificial Intelligence'. Go back 50 years, and it's the language of 'Symbolic Computing'.

Perhaps I'm wrong, but I don't think Lisp is a 'Functional Programming Language' or the 'Lambda Calculus' variety. Yes, Lisp is very much part of the FP Language scene, but that's because it's a language that is flexible enuf to have been part of every programming paradigm undertaken. Oddly enuf, people don't call Lisp an OOP Language, even though CLOS was the first language to provide an standardized OO framework.

The buzz is about Functional Programming Languages these days, and as usual Lisp is able to adapt itself to the paradigm without an inordinate amount of contortion. But Lisp also does imperative, logic, object oriented, etc... The beauty of Lisp is it's ability to be used in practically any programming language paradigm ever thought of. That's why Lisp will still be around 100 years from now.

Patrick Logan - Re: What I Hate About Your Programming Language  blueArrow
5/14/2003; 8:13:30 AM (reads: 1253, responses: 0)
Lisp is a ball of mud. (Paraphrasing Alan Perlis or Joel Moses or someone.)

Paul Snively - Re: What I Hate About Your Programming Language  blueArrow
5/14/2003; 9:02:04 AM (reads: 1228, responses: 0)
"APL is like a diamond. It has a beautiful crystal structure; all of its parts are related in a uniform and elegant way. But if you try to extend this structure in any way - even by adding another diamond - you get an ugly kludge. LISP, on the other hand, is like a ball of mud. You can add any amount of mud to it and it still looks like a ball of mud." — Joel Moses

But Lisp also does imperative, logic, object oriented, etc...

Common Lisp doesn't do logic programming without assistance; Scheme doesn't do OO or logic programming without assistance (of course, "Objects are a poor man's closures." — Norm Adams).

Having said all of that, the observation that Lisp is still the most capable metalanguage, in the literal sense of "language to write languages in," still strikes me as true.

Chris - Re: What I Hate About Your Programming Language  blueArrow
5/14/2003; 6:28:36 PM (reads: 1121, responses: 0)
I was reading a paper about O'Caml today and it said that the original implementaion (from the 1980s) was "hosted" in Lisp. Paul Graham is doing the same thing with his Arc programming language.

From the online version of the unpublished O'Reilly book on O'Caml: http://caml.inria.fr/oreilly-book/html/book-ora202.html

"Caml, the ancestor [of O'Caml], was developed between 1986 and 1990 by INRIA's FORMEL project in collaboration with University Paris 7 and the École Normale Supérieure. Its implementation was based on Le_Lisp's runtime. It integrated within the language the definition of grammars and pretty-printers, which allowed communication of values between the language described and Caml."

Patrick Logan - Re: What I Hate About Your Programming Language  blueArrow
5/14/2003; 8:46:21 PM (reads: 1099, responses: 0)
O'Caml - makes sense. Implementing entirely different languages in Lisp is, or used to be, common, especially for experimental languages. I know of at least one early Ada compiler that was written in Lisp.

Guillaume - Re: What I Hate About Your Programming Language  blueArrow
5/14/2003; 9:05:04 PM (reads: 1092, responses: 0)
>> Pascal was a teaching language. C is portable assembly. Lisp is very much the lambda calculus. Perl is expressive glue.

> I guess 3 out of 4 ain't bad, but something bothers me about everyone's attempt to pigeon-hole Lisp.

Interestingly, the text has now been changed. It now says:
Lisp syntax is very much s-expressions.

Your point still holds :)

Isaac Gouy - Re: What I Hate About Your Programming Language  blueArrow
5/15/2003; 8:35:43 AM (reads: 1023, responses: 1)
"hosted" in Lisp. Paul Graham is doing the same thing
Unclear to me if these aren't just examples of folk making the very sensible decision to use the tool they know best. Do Haskell and ML experts develop experimental languages? Do they host them in Lisp?

Frank Atanassow - Re: What I Hate About Your Programming Language  blueArrow
5/15/2003; 9:43:21 AM (reads: 1045, responses: 0)
Do Haskell and ML experts develop experimental languages? Do they host them in Lisp?

You must be joking!

Isaac Gouy - Re: What I Hate About Your Programming Language  blueArrow
5/15/2003; 9:51:15 AM (reads: 1017, responses: 0)
moi?

Kimberley Burchett - Re: What I Hate About Your Programming Language  blueArrow
5/15/2003; 11:08:58 AM (reads: 995, responses: 0)
I have developed custom langauges in scheme, perl, java, and C++. I use scheme for the most experimental ones, even though I'm not very facile with scheme itself. I find that if I'm working on really experimental stuff like weird execution models or static analysis, it's worth working in scheme despite being unfamiliar with it. However, if it's just a matter of syntax, I stick with languages I know best, like Java and C++.

Paul Snively - Re: What I Hate About Your Programming Language  blueArrow
5/15/2003; 4:41:45 PM (reads: 963, responses: 0)
It probably also helps that there are great entire books on developing languages in Lisp, e.g. Essentials of Programming Languages and Lisp In Small Pieces.

Frank Atanassow - Re: What I Hate About Your Programming Language  blueArrow
5/16/2003; 4:25:16 AM (reads: 934, responses: 0)
moi?

Toi.

Yes, Haskell and ML people develop experimental languages.

And I was going to add, `No, they do not host them in LISP,' but what I really meant was, `No, they do not write them in LISP.' However, I think very few are hosted in LISP also. I can think of two examples which were, though, and there were once undoubtedly more, but seems no longer to be a popular technique. Yale Haskell (which no longer exists) was hosted in LISP, and an early version of Caml (called Camlot, I think?) was compiled to an early version of Bigloo (which is a Scheme).