Common Lisp

For discussing go computing, software announcements, etc.
amnal
Lives in gote
Posts: 589
Joined: Fri Apr 23, 2010 10:42 am
Rank: 2 dan
GD Posts: 0
Been thanked: 114 times

Re: Common Lisp

Post by amnal »

usagi wrote:
amnal wrote:I don't really understand the assertions that 'Lisp's strengths are it's nature as a mathematical expression language and to do AI research.' and 'It's syntax is a disadvantage.' For the former, there just doesn't seem to be much reason to say that, is there any evidence that it's true? For the latter, that's entirely subjective, and not really an argument.


You're absolutely right. John McCarthy, the guy who invented Lisp and implemented it and so on and so forth, the same John McCarthy who is regarded as the father of Computer Science and of Artificial Intelligence, has a completely subjective view of the language he invented and it's place in the field of study he invented.


(I don't know what you're referring to, sorry if I missed something, but I assume John McCarthy said something along the lines of 'lisp is outdated'.

Are you serious? Is this actually your argument?

Do you think John McCarthy is solely responsible for all the work that's gone into common lisp, scheme, clojure (in themselves all different from the original lisp implementaitons)? If not, were all the other people who worked on these labouring under a misapprehension, not realising that the statement of some guy (who fathered computer science, no less, and thus has absolute knowledge of the subject) has invalidated the point of the work they're doing? That the languages they enjoy programming in and find useful are actually inferior to other languages, and they just haven't noticed because they're idiots/blind/stupid?

Or maybe these people know something you don't. Maybe lisp, or at least dialects of lisp, are really good languages that are just as good as any other for most tasks, better for some, worse for others...

Also, I don't retract the statement that your views on lisp are subjective. Just because some guy who knew more also said it (assuming he did) also doesn't make them objective, and doesn't make him objective either.

usagi wrote:I mean come on, there's dozens of different languages. We could probably nix half of them and no one would really notice.



Another 'wait, what?' argument here. Your argument makes very little sense...we could replace python with ruby, they're similar in many ways, but does that mean that we should? And even if it did, why this way around rather than replacing ruby with python?

Of course we could do the same things we do now with fewer languages. We could do find without java, for instance, and many of the people who hate java could probably supply 'good' reasons to do so. But this isn't an argument against not using any particular language, and isn't obviously a correct argument in the first place.
User avatar
Bantari
Gosei
Posts: 1639
Joined: Sun Dec 06, 2009 6:34 pm
GD Posts: 0
Universal go server handle: Bantari
Location: Ponte Vedra
Has thanked: 642 times
Been thanked: 490 times

Re: Common Lisp

Post by Bantari »

Mike Novack wrote:Could I insert something here?

From the earliest days every couple years a new language gets introduced. Some of these remain in use over the decades, others fade relatively rapidly. There are reasons for that (why the "survivors" survive). Or in some cases why some new language does succeed in replacing an old one (usually it incorporates the capabilities of the old).

I could argue that having been considered useful for a lot of people for at least a couple decades should be weighted more heavily in the decision of what langauge to learn than any current hype.

If you are going to be going into programming seriously then you will be learning several langauges over your career but of these half (or more) will be the hoary veterans.


I know what you mean, but I disagree.

Hype notwihstanding, there are languages which are more suitable for learning programming, and ones which are less suitable. And this really have nothing to do with the actual popularity or longevity of a language. Unless you are assuming you will learn one and only one language (in which case it would depend on what you want to do - for example if you are planning to be a web developer with one and only one language, I suggest javascript.)

There are several factors that can make a language good for a beginner or not. Remember - we are not talking complex programs here, just learning and slowly going up the ladder. Clear application of the concepts, intuitive syntax, overall stability, accessibility of resources, and most importantly - abundant learning material and a hopefully a large and diverse community. From my personal experience, good languages to learn programming concepts from are for example Pascal/Delphi and Java. Bad ones would be, among others C, C++, Ruby, PHP, and yes: Lisp, Common or not. Usagi mentioned quite a few of the reasons for that, and for what its worth - I do agree with him.

But regardless - in all these languages you can be a wiz, and if you are, chances are you'd argue for the superiority of your particular little language/skill until the cows come home, and the more obscure the language/skill the more aggressive the argument and the more personal the discussion gets. We see examples in this very thread. In each of the languages great code can be written, and difficult problems solved. In each a lot of crappy code has been written as well. Good programmers write good code in whatever language they use, and bad programmers are a pest anyhow, so who cares.

And people who turn into programming language evangelists are just misguided, imho.
- Bantari
______________________________________________
WARNING: This post might contain Opinions!!
User avatar
Harleqin
Lives in sente
Posts: 921
Joined: Sat Mar 06, 2010 10:31 am
Rank: German 2 dan
GD Posts: 0
Has thanked: 401 times
Been thanked: 164 times

Re: Common Lisp

Post by Harleqin »

Bantari, I think that you do make some valid points, but there are also some things I find debatable, especially those that seem to be directed at me.

For one, I did not evangelize. I specifically said that I do not claim any kind of superiority of Lisp. All I did was claim that it is at least equal to other, more mainstream choices when it comes to building "serious" applications.

Your criteria for good languages to learn programming are perhaps OK. ("Intuitive syntax" is an illusion, though; "intuitive" just means "what I expect from prior experience", which is irrelevant for someone not having such prior experience. On the other hand, someone who does have prior experience with different syntax may benefit from acquiring a new perspective---the languages we know enable the ways we think.) However, your next step would be to confirm whether these criteria are met by the individual languages you mention. I would not know where to look for good Pascal or Delphi tutorials, I would also not know where to find the community, and it would take quite some work to confirm the stability of the implementations. I think that this is just the case for you and the languages you deem bad for learning, nothing more.

I can just tell you that Common Lisp has brought me up to dan level in programming, in record time. It also meets your criteria, by the way.

I refrain from summarily dissing things I do not know good enough, even Java, and I do not claim superiority of things I am a fan of, even Common Lisp. I try to be aware of the limits of my knowledge. I will give recommendations, however, and I will contradict anyone who out of ignorance puts things down that do not deserve it.
A good system naturally covers all corner cases without further effort.
User avatar
Bantari
Gosei
Posts: 1639
Joined: Sun Dec 06, 2009 6:34 pm
GD Posts: 0
Universal go server handle: Bantari
Location: Ponte Vedra
Has thanked: 642 times
Been thanked: 490 times

Re: Common Lisp

Post by Bantari »

Harleqin wrote:Bantari, I think that you do make some valid points, but there are also some things I find debatable, especially those that seem to be directed at me.

For one, I did not evangelize.


Never said you did - it is you who felt addressed.
As a matter of fact, this is one of my pet peeves of lately, since there seems to be a lot of that in the RoR community. This is what I referring to, sorry for the lack of clarity. You made some good points about Lisp too, even though it seems to me you get your panties up in a bunch about usagi's questions and remarks - and all he seems to be saying is that Lisp does not look like its a good first language to learn, which I agree with.

Harleqin wrote:"Intuitive syntax" is an illusion, though; "intuitive" just means "what I expect from prior experience", which is irrelevant for someone not having such prior experience.


I beg to differ on this issue.
I simply find 2 + 2 more intuitive that + 2 2. Even to a non-programmer (ESPECIALLY to a non-programmer, I'd say!)
I would assume most of us would agree on this point. Same goes for most of the other examples you give about Lisp syntax.

Remember - even if somebody does not have any experience with programming languages and their syntax, he did not grow up in a vacuum, and he caries a lot of conceptual conventions from school, work, and life in general. A lot of languages use syntax which at least attempts to cater to these common conventions. It seems to me that Lisp does not care much, and instead it caters to some other values. It does not make it bad, it just makes it less beginner-friendly.

This is not a critique of Lisp - I will be the first to admit that I have absolutely no clue about it, I judge it merely from the examples you yourself provided... I assume these were 'especially clear' examples, which seems to reinforce the point usagi is trying to make. From what I read suggests that its a great and powerful language. But trying to feed it to beginners is not good since you present them not only with the hurdle of having to learn basic concepts of programming, but also force them to throw out some of the ideas they consider 'natural' in favor of syntax that's precise but maybe not quite as readable.
- Bantari
______________________________________________
WARNING: This post might contain Opinions!!
User avatar
Harleqin
Lives in sente
Posts: 921
Joined: Sat Mar 06, 2010 10:31 am
Rank: German 2 dan
GD Posts: 0
Has thanked: 401 times
Been thanked: 164 times

Re: Common Lisp

Post by Harleqin »

Bantari wrote:
Harleqin wrote:Bantari, I think that you do make some valid points, but there are also some things I find debatable, especially those that seem to be directed at me.

For one, I did not evangelize.


Never said you did - it is you who felt addressed.


I realize that (that is what the "seems" is for), but I want to ensure that this also is clear for observers.

[...] and all he seems to be saying is that Lisp does not look like its a good first language to learn, [...]


No, he explicitly stated that Lisp is not a general purpose language suitable for modern programming challenges. That is a much bolder claim, one that damages the public impression of Lisp much more, but which is also much easier to refute.

Harleqin wrote:"Intuitive syntax" is an illusion, though; "intuitive" just means "what I expect from prior experience", which is irrelevant for someone not having such prior experience.


I beg to differ on this issue.
I simply find 2 + 2 more intuitive than + 2 2, even to a non-programmer (ESPECIALLY to a non-programmer, I'd say!).

Remember - even if somebody does not have any experience with programming languages and their syntax, he did not grow up in a vacuum, and he caries a lot of conceptual conventions from school, work, and life in general. A lot of languages use syntax which at least attempts to cater to these common conventions. It seems to me that Lisp does not care much, and instead it caters to some other values. It does not make it bad, it just makes it less beginner-friendly.


You are trying to transfer prior experience from mathematical expressions to programming expressions. This transfer is a rather thin one, however.

Infix notation is only used for very basic binary operators in mathematics. Other operators write their arguments above, below, or as a sub- or superscript (sums, products, limes, logarithms, for example). Exponentiation is even done implicitly just through superscripting one of the arguments. Unary operators mostly come before their argument (sin and cos, for example, or such things as the Hamilton operator).

In C, operators usually come before their arguments, which are written in an ad-hoc list format: "operator (arg1, arg2)". Infix operators are an exeption, and they are only defined for some built-in functions (this is a difference between built-in and user-defined functions). If C had a unified syntax, you would have to write "+ (2, 3)". So, when you have learnt "2 + 3" in C, you actually have only seen a special case, which does not tell you much about how C syntax works generally. Also, "=" means totally different things in C and in mathematics: in mathematics, it is symmetric, denoting equality of both sides, while in C, it is assymmetric, its left operand needs to be an "lvalue" (i.e. a place that can be assigned to), and it denotes assignment. I think that it is surprising for a beginner that "x = 2 + 3;" is valid, but "2 + 3 = x;" is a syntax error. The similarity to mathematical notation can be seen as misleading here.

Now (without claiming that this approach is superior, just equal), in Lisp, you write "(+ 2 3)". This is how Lisp evaluation works generally. You can write your own implementation of "+", which works the same way: "(plus 2 3)". I think that the similarity of C syntax to mathematical notation is quite superficial, only applies to certain built-in features, and does not really aid in understanding C.

This is not a critique of Lisp - I will be the first to admit that I have absolutely no clue about it, I judge it merely from the examples you yourself provided... I assume these were 'especially clear' examples, which seems to reinforce the point usagi is trying to make.


Which examples do you mean? I can attempt to translate them to a language of your choice, in order to compare.

From what I read suggests that its a great and powerful language. But trying to feed it to beginners is not good since you present them not only with the hurdle of having to learn basic concepts of programming, but also force them to throw out some of the ideas they consider 'natural' in favor of syntax that's precise but maybe not quite as readable.


We can have a similar argument about "readable" as about "intuitive", since people often mean "similar to C" (or Python, or Ruby) when they say "readable". However, it is easier to define criteria for "readable" than for "intuitive", so this needs not be a handwaving argument. We can incorporate this into the comparison mentioned above.
A good system naturally covers all corner cases without further effort.
Post Reply