Lambda the Ultimate

inactiveTopic Philip Greenspun: Lisp diehards = Holocaust deniers
started 9/23/2003; 2:51:56 AM - last post 10/5/2003; 10:02:24 AM
Luke Gorrie - Philip Greenspun: Lisp diehards = Holocaust deniers  blueArrow
9/23/2003; 2:51:56 AM (reads: 14637, responses: 24)
Philip Greenspun: Lisp diehards = Holocaust deniers
Philip Greenspun states his programming language preference, and an interesting one it is:

Common Lisp, CLOS, plus an ML-like type inferencing compiler/error checker (with some things done in a sublanguage with Haskell semantics and Lisp syntax).

There is often seen to be a conflict between "the Lisp way" and ML-like type systems. Does embedding an ML- or Haskell-like language in Lisp reconcile these differences, at least from the Lisp programmer's perspective?

Posted to general by Luke Gorrie on 9/23/03; 2:56:35 AM

Bart van der Werf (Bluelive) - Re: Philip Greenspun: Lisp diehards = Holocaust deniers  blueArrow
9/23/2003; 9:11:04 AM (reads: 1956, responses: 1)
After his earlier story saturday on java i was waiting for him to show up here. Really with such a title what else to think about this than one big fat troll? Language extremeismes really isnt going to help anyside.

Matt Hellige - Re: Philip Greenspun: Lisp diehards = Holocaust deniers  blueArrow
9/23/2003; 9:25:18 AM (reads: 1968, responses: 0)
Not to mention that it's a pretty unusual rhetorical device (to say the least) to compare yourself to a Holocaust denier and then go on to defend the position... A troll in more ways than one, I'd say...

Paul Snively - Re: Philip Greenspun: Lisp diehards = Holocaust deniers  blueArrow
9/23/2003; 9:26:21 AM (reads: 1938, responses: 0)
I'm guessing that you gentlemen haven't encountered Philip Greenspun before? :-)

Luke Gorrie - Re: Philip Greenspun: Lisp diehards = Holocaust deniers  blueArrow
9/23/2003; 9:44:17 AM (reads: 1921, responses: 0)
The holocaust-denial analogy seemed tenuous and irrelevant to me. I only put it in the title to identify the article.

The idea of embedding a language with an ML-like type system in Lisp strikes me as very interesting. A small but significant amount of the code I write manipulates complex data structures, and in that code I think such a type system might be very helpful. I'd like to experiment with writing those parts with a static type system and embedding them in my regular dynamically-typed programs.

If the static typing fans are right that their way is better, it would also be a stepping stone towards that. Perhaps I could also put lazy evaluation and monads to good use, I don't know.

I hope Philip can be prevailed upon to post the code, or that some LtU reader has experience in this area to share. Like many Lispers, I don't really understand a language until I've seen it implemented in Lisp.

P.S., Philip Greenspun gets up a lot of peoples noses, but he is a very intelligent and accomplished guy. If you haven't already, you might like to look around his website. I found "The book behind the book behind the book.." particularly entertaining.

John Carter - Re: Philip Greenspun: Lisp diehards = Holocaust deniers  blueArrow
9/23/2003; 4:47:52 PM (reads: 1794, responses: 0)
We all made a wrong turn.

Compilers and complex syntax wasn't the right answer.

Simple syntax, and tools to help analyse, visualise, navigate and correct programmes is the right answer. It's just that we have put 30 or more years into the wrong answer and are all too red-faced to back out now.

Guillaume - Re: Philip Greenspun: Lisp diehards = Holocaust deniers  blueArrow
9/23/2003; 5:26:11 PM (reads: 1783, responses: 1)
We all made a wrong turn.

I'd like to learn more about your view, any pointers on researches or projects which you think are doing the right thing? Thanks.

Alex Peake - Re: Philip Greenspun: Lisp diehards = Holocaust deniers  blueArrow
9/23/2003; 6:17:30 PM (reads: 1779, responses: 0)
Take a look at Qi

http://www.simulys.com/guideto.htm

Type checking in Lisp

Cotton Seed - Re: Philip Greenspun: Lisp diehards = Holocaust deniers  blueArrow
9/23/2003; 7:19:13 PM (reads: 1742, responses: 0)
The Infer project tried to do just that: add a ML-style static type system to Scheme, although that doesn't include CLOS.

http://www.cs.indiana.edu/~chaynes/infer.html

Luke Gorrie - Re: Philip Greenspun: Lisp diehards = Holocaust deniers  blueArrow
9/24/2003; 12:55:08 AM (reads: 1644, responses: 0)
I mailed Philip Greenspun asking for some code or references, and alas his favourite language is actually hypothetical. Ho hum.

I'm glad I posted it all the same: Qi is just the reference I was fishing for. Thanks Alex!

Michael Vanier - Re: Philip Greenspun: Lisp diehards = Holocaust deniers  blueArrow
9/24/2003; 3:23:19 PM (reads: 1390, responses: 0)
Infer is a dead project, AFAIK. Too bad; it's a great idea and I'd like to see more work along these lines.

samx - Re: Philip Greenspun: Lisp diehards = Holocaust deniers  blueArrow
9/24/2003; 4:06:15 PM (reads: 1384, responses: 0)
Instead of statically typed sublanguage for lisp, I am looking forward to a dynamically typed extention to ML, such as http://pauillac.inria.fr/~furuse/generics

Same thing, but coming from the other end.

Reilly Hayes - Re: Philip Greenspun: Lisp diehards = Holocaust deniers  blueArrow
9/25/2003; 5:37:53 AM (reads: 1252, responses: 0)
Why does type inference get such little respect from so many people in the dynamic typing crowd? Referring to it merely as "static typing" carries the subtext that it is no different than typing in Pascal, C, or C++. Clearly it is very different from static typing as implemented in these languages.

I have a personal preference for LISPs, but my experiences with OCAML persuaded me that working with a type inferred language is a very different experience for the developer than working with statically typed languages.

Luke Gorrie - Re: Philip Greenspun: Lisp diehards = Holocaust deniers  blueArrow
9/25/2003; 6:18:08 AM (reads: 1241, responses: 0)
FWIW, I'm in the dynamic typing crowd and "static typing" does not carry that subtext to me. I think of ML/Haskell typing, which I have very little experience with.

Patrick Logan - Re: Philip Greenspun: Lisp diehards = Holocaust deniers  blueArrow
9/25/2003; 7:09:40 AM (reads: 1217, responses: 0)
Why does type inference get such little respect from so many people in the dynamic typing crowd? Referring to it merely as "static typing" carries the subtext that it is no different than typing in Pascal, C, or C++. Clearly it is very different from static typing as implemented in these languages.

I draw the distinction, and I do respect the approach with ML, Haskell, etc. The biggest hurdle for me is that I am comfortable with dynamic languages and test-driven design. I am not sure how much more productive I would be with, say, Haskell.

At the same time the kind of programming I do most often requires writing extensions to Java and C# systems. A simple language like Jython or DotLisp supports exactly what I want. The "newer" functional languages don't seem to have as low a barrier to entry for this need, as far as I can tell.

Some day I expect these more sophisticated type systems to provide even more information and guidance than they do currently. I think it will take some order of magnitude leap in dynamic modeling functionality to get me to abandon something as simple as Smalltalk and SUnit.

Frank Atanassow - Re: Philip Greenspun: Lisp diehards = Holocaust deniers  blueArrow
9/25/2003; 7:42:10 AM (reads: 1198, responses: 0)
Instead of statically typed sublanguage for lisp, I am looking forward to a dynamically typed extention to ML, such as [G'Caml]

G'Caml has nothing to do with dynamic typing.

Maybe I need to make an LtU FAQ for this sort of thing, though, frankly, I would never have expected someone to make this particular claim.

Alex Peake - Re: Philip Greenspun: Lisp diehards = Holocaust deniers  blueArrow
9/25/2003; 7:46:37 AM (reads: 1197, responses: 1)
I think of Type Inference added to a Dynamic Language as getting the best of both worlds.

All the power of dynamic languages with an added check of "...and the objects/modules/... do in fact implement this interface".

It is about Interfaces, not Types as in the C#/Java sense.

Daniel Yokomiso - Re: Philip Greenspun: Lisp diehards = Holocaust deniers  blueArrow
9/25/2003; 8:28:08 AM (reads: 1206, responses: 0)
It is about Interfaces, not Types as in the C#/Java sense.
In Java/C# both classes and interfaces denote types. Could you elaborate more on how Interfaces aren't Types?

Patrick Logan - Re: Philip Greenspun: Lisp diehards = Holocaust deniers  blueArrow
9/25/2003; 11:22:06 PM (reads: 1032, responses: 0)
G'Caml has nothing to do with dynamic typing.

The one fairly loose connection appears to be the use of runtime type information in the implementation. But I also thought the stated association with dynamic typing was misleading.

samx - Re: Philip Greenspun: Lisp diehards = Holocaust deniers  blueArrow
9/26/2003; 4:19:31 PM (reads: 922, responses: 0)
G'Caml has nothing to do with dynamic typing.

Maybe I need to make an LtU FAQ for this sort of thing, though, frankly, I would never have expected someone to make this particular claim.

G'Caml adds a dynamic type 'dyn', and a constructor/function to create them '$a -> dyn'. That is, dyn type carries both the value and its type. As far as I understand, this is the definition of dynamic typing. Do you disagree ?

You cannot pass these dynamic types as parameters to functions expecting specific static types. But you can create functions, that expect dynamic types as their parameters, creating the ability to make a dynamically typed sublanguage.

In the functions using the dynamic types as their proper static types, you have to first coerce them to their proper static types. This is done explicitly. If this is what concerns you, I would like to point out, that 'dynamically typed languages' such as Lisps, would do this very same thing, but implicitly.

John Carter - A right turn...  blueArrow
9/28/2003; 7:01:32 PM (reads: 787, responses: 0)
G. Germain:- I'd like to learn more about your view, any pointers on researches or projects which you think are doing the right thing?

Consider the complexity of parsing C++ for purposes of static analysis.

It is utterly devilish.

I would argue there is close relationship between the difficulty with which a program can make decisions on the correctness of a program and the difficulty with which a programmer can.

The whole trend to complex syntax arose from the history of how difficult it was to make decisions about the correctness of assembler programs.

So what viable alternatives have been demonstrated?

Joy.

Go to http://www.latrobe.edu.au/philosophy/phimvt/joy.html

In particular pay attention to Von Thun's papers on an Algebra for Joy and a Rewriting System for Joy.

Just as a tickler, here is his minimal joy in joy interpretor. Try write somthing like that in C++ and I'll see you a couple of thousand lines later...

joy0 == [ [ [ joy0 body joy0 ] [ [] ] [ pop pop pop ] [ cons pop cons ] [ opcase pop opcase ] [ body pop body ] [ i pop joy0 ] [ step pop [joy0] cons step ] [ [] cons i ] ] opcase i ] step

Frank Atanassow - Re: Philip Greenspun: Lisp diehards = Holocaust deniers  blueArrow
9/30/2003; 3:39:23 AM (reads: 673, responses: 1)
G'Caml adds a dynamic type 'dyn', and a constructor/function to create them '$a -> dyn'. That is, dyn type carries both the value and its type. As far as I understand, this is the definition of dynamic typing. Do you disagree ?

I agree that this is dynamic typing, but it is only one application of generic polymorphism and, I think, not a representative one. Indeed, you can do almost the same thing without genericity, as I once demonstrated here and here.

When embedding a dynamically typed language in a static host language, the difference between having genericity and not is that, with it, you can automatically embed all the user-defined datatypes of the host language, whereas without it you need to enumerate them manually. Most DT languages have a fixed set of built-in data types anyway, and to extend them you need to go outside the language.

Isaac Gouy - Re: Philip Greenspun: Lisp diehards = Holocaust deniers  blueArrow
9/30/2003; 8:05:44 AM (reads: 668, responses: 0)
Most DT languages have a fixed set of built-in data types anyway, and to extend them you need to go outside the language.

Isn't that wrong for any dynamically checked language that supports OO?

note: I did notice the modifier, this is to check what I misunderstood

Patrick Logan - Re: Philip Greenspun: Lisp diehards = Holocaust deniers  blueArrow
9/30/2003; 8:43:50 PM (reads: 626, responses: 0)
In the functions using the dynamic types as their proper static types, you have to first coerce them to their proper static types. This is done explicitly. If this is what concerns you, I would like to point out, that 'dynamically typed languages' such as Lisps, would do this very same thing, but implicitly.

Implicit vs. explicit is the key difference.

Frank Atanassow - Re: Philip Greenspun: Lisp diehards = Holocaust deniers  blueArrow
10/5/2003; 10:02:24 AM (reads: 562, responses: 0)
Isn't that wrong for any dynamically checked language that supports OO?

I dunno. I guess it depends on what you mean by `OO' and `data type'.

Oh and, kudos for using the correct term `dynamically checked'. :) I should start doing this too.