Super-dee-duper D features

Kevin Bealer kevinbealer at gmail.com
Mon Feb 12 23:54:13 PST 2007


X Bunny wrote:
> Bill Baxter wrote:
...
> Also CL is not just a functional language, Like D CL is multiparadigm. 
> With CL you can easily write procedural code with side effects like C++ 
> or D or you can use object orientated, aspect orientated, functional, 
> logic, pattern matching and many other programming concepts. Whats more 
> you can add other programming concepts easily should you like.

First you suggest that there is some ignorance about what LISP can do; 
let me be the first to confess to having some of that.  Having said that...

It always seemed to me that LISP syntax for the 'other paradigms' and 
for iterative programming was designed to steer people away from them. 
I need to use a "let" and introduce a new scope just to define a 
variable.  I feel like I am using a spoon to cut carrots.  It can be 
made to work, but...  I know that that's mostly a syntax thing though.

>> My point is just that I don't think syntax is the *only* thing that's 
>> prevented lisp from becoming wildly popular.  If that were the case 
>> then the answer would be to simply create a different syntax for Lisp. 
>> (Actually, according to someone's comment here 
>> http://discuss.fogcreek.com/newyork/default.asp?cmd=show&ixPost=1998 
>> it's been done and it's called Dylan, another not-wildly popular 
>> language).  So I think the problem is more fundamental.

To me dylan looks more like ML than, say, C.  Different is not enough, 
but 'better' would be interesting to see.

> My personal feelings as to why Lisp isnt as popular as it could be are 
> some of these misconceptions:
> 
> 1) Its all functional code and recursion
> 2) The syntax is weird and mindbending
> 3) Lisp is interpreted and therefore slow.
> 4) Its hard to interface Lisp with non Lisp libraries and operating 
> system services.
> 5) Lisp is old and hasnt changed since the 50's
> 6) The features are really clever but they wouldnt be useful in a 'real' 
> program
> 7) Its for AI or 'weird' programs
> 8) You have to be really clever to program in Lisp
> 9) Lisp is poorly documented and hard for a beginner to understand
> 10) Its irrelevant because we have Java/C++/something else now

I've looked at LISP a number of times but something always pushes me 
away, including some of the misconceptions here, however:

1. You can avoid this but the language, tutorials, books, libraries, 
other LISPers, and so on, all seem to want you to go down the recursion 
path.

2. The syntax doesn't provide visual hints that let you read a program.

Web pages use different colors, road signs use different shapes, other 
languages use different punctuation, etc.  I can accept that they all 
turn into trees on some level, but it makes it unreadable to represent 
that in the syntax.  It's like writing all strings in hex notation. 
Yes, yes, I know they turn into numbers.  Show me the strings anyway; 
and use quotes when you do it.

Accountants use paper with green bars on every other line, so that your 
eye can *follow* it.  The green bars don't do anything else, but they 
still help a lot with readability -- I've actually thought that other 
books, i.e. novels might benefit from being printed this way.  Good 
syntax needs to consider *ergonomic* concerns, not teach an important 
lesson about parse trees.

Most importantly: If a chair hurts everyone that sits in it, but "only 
for the first year" its not a good chair.

3. I'm not sure I buy that this is a myth per se.

The rest I'll grant as probably misconceptions, especially 6.

I think the real clincher is that when people describe these kinds of 
issues the LISP community's response seems to be something like "get 
used to it and you won't notice it".  Other languages may catch up with 
some of LISP's features, but what I consider to be the problems with 
LISP can't be fixed because they aren't seen as problems.

Kevin



More information about the Digitalmars-d mailing list