Live data from Hacker News

Why Lisp Is Unpopular

news.ycombinator.com

121–130 of 159 posts

Re: Why Lisp Is Unpopular

#121
post #115

Earlier quoted context omitted.

So programmers who work with objects and methods don't have to think about them, while programmers who work with macros do? Sorry, but this just seems ludicrous to me. Perhaps what you mean is that when a construct is unfamiliar to a programmer then they have to think harder about how to use it? http://www.google.com/search?q=blub

I am saying that working with objects and methods requires less high-level cognitive processing than macros and continuations, not that you don't have to think about them. This is because the brain can treat the objects largely as if they were physical objects. With macros that is much harder. No, I don't mean unfamiliar. Things like parentheses and prefix notation are unfamiliar to many people, but once learned, the…

"I am saying that working with objects and methods requires less high-level cognitive processing than macros and continuations, not that you don't have to think about them. This is because the brain can treat the objects largely as if they were physical objects. With macros that is much harder."

It's not. It's just a matter of practice. Most people find OO modeling natural (even when it is extremely tortured and difficult) because they've acquired a comfort with it born of many hours of practice. You might argue that you're not referring to familiarity with the paradigm, but I think you are, and don't realize it.

I assure you that a functional style has equal power to abstract as a OO style. You're right, our brains have a good ability to think of things as sets of objects. But the lisp style leverages the linguistic propensity to give words special significance. We're also very good at learning languages and parsing sentences in context, so the lisp linguistic style leverages similar natural cognitive abilities.

Re: Why Lisp Is Unpopular

#122
post #74

Earlier quoted context omitted.

While lisp code is represented as lists, other user data can be represented with hash tables, vectors, arrays, classes, etc, including lists. (Yes, the name "lisp" refers to lists, but the language has grown since the name was picked.) Also, it's easy to represent arbitrary graphs with lists, in much the same way that you'd do so with hash tables, structs, etc. Yes, the way that a node refers to other nodes differs b…

I was only talking about the code itself, the primary metaphor of the programming language, not what the language actually represents. Most langs that I've encountered are structured as semi-formalized strings (i.e. C-derived langs), where as Lisp is structured in "physical" lists. I shouldn't have talked about "abstractions," because that wasn't what I meant. I was getting at the "concretions" of the actual lingual…

> was only talking about the code itself, the primary metaphor of the programming language, not what the language actually represents. Most langs that I've encountered are structured as semi-formalized strings (i.e. C-derived langs), where as Lisp is structured in "physical" lists.

Huh? Let's review.

>>>If that's true, it follows list-oriented languages are inherently inferior to their hashtable-oriented brethren.

Javascript code is semi-formalized strings or ASTs.

The careful reader has noticed that lists that represent code are ASTs with context-dependent field names. Since the nodes provide the context, said dependence isn't a big deal.

I don't know how many javascript programs manipulate their ASTs. (Lisp programs with macros are manipulating their ASTs.) The vast majority of javascript hash table operations are on data. (Yes, lisp code can be data, but not all lisp data is code.) In that, they're no different than any other language that has decent hash tables, such as lisp.

Re: Why Lisp Is Unpopular

#123
post #88

Earlier quoted context omitted.

Ok, I think I get you. But then I think you can't categorize programming languages this way, the default data-structures provided by the language don't characterize it. In fact, it seems to me that you like most JavaScript because it's object oriented, it's dynamic typing and functions are first-class. Features that others languages lack, and not because the "dominant metaphor" is the hash. Casually in JavaScript the…

Built-in data structures are a big point of categorization of langs on my end. To me, the defining feature of Java is its classical structure. If you got rid of classes, you'd have a different language (in the interface sense). And interface is really all I'm talking about. I'm basically just asserting that objects (should) == hashtables. This is quite literal in JavaScript. Other languages bend the metaphor in diffe…

If objects == hash tables, any language with decent hash tables, including lisp, has objects that you're perfectly happy with. Lisp also has other data types, but their existence means that lisp has more power, not less.

Re: Why Lisp Is Unpopular

#124
post #61

Earlier quoted context omitted.

And what about CLOS? Does not make Lisp, in your words, a "hash programming language"? Really I don't get the difference you state between list/hash programming languages, I've work a little with EcmaScript and I don't know anything about Io, but I'll put it in my to-do list. Can you, please, extend it? What's the main difference between them? Because you say that the primary abstraction of a "list" programming langu…

I've never looked at CLOS. But, what I mean is the "dominant metaphor," which I suspect is still lists. I'll just go through my probably plebeian understanding. Arrays are to lists as hashtables are to objects. An array, in my mind, is a list that only contains one type and is indexed with enumerated integers. On the other hand a list can contain any type, but is also indexed with enumerated integers. In JavaScript:…

> But, what I mean is the "dominant metaphor," which I suspect is still lists.

That tells us more about the basis for your suspicions than it does about lisp.

It's okay to like javascript more than you like lisp. It's also okay to be mostly ignorant of lisp. However, it's poor form to make up things to "support" those positions.

Re: Why Lisp Is Unpopular

#125
post #90

Earlier quoted context omitted.

In my experience, Common Lisp often doesn't come out best at the code snippet level. Where it shines is in building whole systems. After a while one passes an inflection point where one realizes, "Holy cow - what I'm doing now is supposed to be way harder than it is". I probably have this experience every week. You obviously put a lot of sincere effort into learning Lisp and I agree with much of what you say. After a…

The best demonstration of that "big system" effect that I've seen, that's easy and small enough to read and comprehend, is the database[1] or unit testing[2] chapters in Practical Common Lisp. They show good examples of using macros and HOFs to completely remove boilerplate code, and that it's simple enough to do it for even simple boilerplate . [1] http://www.gigamonkeys.com/book/practical-a-simple-database.... [2]…

Unfortunately that is not really what people mean with "big system" - although I do agree with your point. It shows how nice it can be when you add on complexity.

I really should get that book in paper form.

Re: Why Lisp Is Unpopular

#126
post #115

Earlier quoted context omitted.

I am saying that working with objects and methods requires less high-level cognitive processing than macros and continuations, not that you don't have to think about them. This is because the brain can treat the objects largely as if they were physical objects. With macros that is much harder. No, I don't mean unfamiliar. Things like parentheses and prefix notation are unfamiliar to many people, but once learned, the…

"I am saying that working with objects and methods requires less high-level cognitive processing than macros and continuations, not that you don't have to think about them. This is because the brain can treat the objects largely as if they were physical objects. With macros that is much harder." It's not. It's just a matter of practice. Most people find OO modeling natural (even when it is extremely tortured and diff…

I am familiar with functional programming. In fact, for some reason recursion and higher-order functions always seemed easy to me (unlike pointers and virtual methods), but I think that's a quirk of my brain. Many other people seem to have a lot of trouble with the idea that you can just make a recursive call and trust that it's going to do what it is supposed to.

Not me personally, though.

But the lisp style leverages the linguistic propensity to give words special significance. We're also very good at learning languages and parsing sentences in context, so the lisp linguistic style leverages similar natural cognitive abilities.

Linguistic processing does require more cognitive effort, especially when it involves something like a macro that can change the context in which it is invoked. For exactly the same reason, most people are more productive with a graphical user interface than with a command-line one. This is directly related to the fact that abstract linguistic processing is more difficult than manipulation of the tangible, physical objects you find in a GUI.

Re: Why Lisp Is Unpopular

#127
post #80

Earlier quoted context omitted.

I think the problem Lisp has is that very few people are forced to use it. If you look at the average programmer, he doesn't want to think about programming, he just wants to press keys an go home. So a language that requires you to think instead of type is not something that he is going to flock to. I think the sad reality is that most programmers aren't very smart, so smart languages will never become popular. I'm…

I think most people prefer languages that let them think about the problem they are trying to solve, rather than think about what the macros expand to, or what happens when they call that continuation.

Maybe it's just because I've been using Common Lisp exclusively for a year, but what's so hard about macros? Especially, using them (as opposed to writing them).

You don't have to think about how the macro is written or what it's expanding into when you use it, you just have to know the semantics of the macro. "When I pass such and such, it will produce code that evaluates this in that way". Similar to a function or a language primitive right? If you're writing a for loop in Java, do you have to care how it's implemented in the JVM?!

As for writing macros: you're writing a function that takes an AST and returns an AST to use as replacement. This function will be called at compile-time to change your nice high-level macro call into lower-level code. There are a couple pitfalls (variable capture, multiple evaluation) but they're always the same and you'll learn about them quickly enough that it will become a sixth sense.

Re: Why Lisp Is Unpopular

#128
post #15
post #14

Earlier quoted context omitted.

Whoever had downmoded my comment: please, can you explain me the rationale for such action? So I never again piss you off with, what seems to me, an in-topic comment. Thank you very much.

You probably stepped on the toes of someone who likes Perl and Windows. Particularly, you mentioned Mac OS which some people have an inexplicable antithesis towards. You're playing with fire, my friend ;) Downmods are the least of your worries now.

I can explain the antithesis:

1. They fear the unknown; 2. They fear fanatics.

Mac OS is The Unknown to them + Mac users tend to be pretty rabid fanatics = Let's bash them!

Re: Why Lisp Is Unpopular

#129
post #10

I like Lisp a lot, and from my own experience I think that the main reasons why people dislike Lisp are prefix notation and parentheses . Sure, my experience is only anecdotal and not at all large. But always I've tried to introduce someone to Lisp (I'm talking of about 5 people, none of them have converted...) they seem incapable to see further than the parenthesis and the prefix notation, but specially the parenthe…

I think lisp's problems started when it wasn't designed for actual use. It is elegant, functional, and amazingly regular. Usability wasn't a design goal. If you look at languages in wide use, they're all procedural - everything from ASM and basic to ruby and python. Similarly, all the pseudocode I've seen has been procedural. If you ask a lay person to come up with a way of making 20 pb&j sandwiches, you're going to…

"If you look at languages in wide use, they're all procedural"

SQL?

Re: Why Lisp Is Unpopular

#130
post #28

I don't understand. Is the claim that Lisp is less popular now because years ago large numbers of programmers working on government-sponsored projects had to use it, but now proportionately fewer programmers work on government-sponsored projects?

Yes, I believe the claim is that when huge government projects like this were completed, all the Lisp programmers left, and had to retrain to find non-Lisp jobs. This sounds similar to the "AI collapsed and took Lisp with it" argument.

There may be something to that argument, but another probably bigger factor is that there are now other dynamic languages. In 1990 there was no Python or Ruby. If you wanted to program in that kind of high level style, the only options were Lisp and Smalltalk.
Post reply on HN