On Apr 10, 12:13 pm, "rig...@gmail.com" <rig...@gmail.com> wrote:
> I'm debating whether I should learn scheme or lisp. Why is lisp a > better choice than scheme or viceversa?
depends on your goals:
if you're looking for a pure learning experience with plenty of time on your hands, then lisp is the road to take - richer functionality (meaning more terse code), better way of coding macros IMHO & faster.
if you're looking to get productive fairly quickly (good ide, web server, batteries included), then plt scheme is a candidate.
this is coming from someone who's being casually doing lisp every so often and by no means an amateur.
"rig...@gmail.com" <rig...@gmail.com> writes: > I'm debating whether I should learn scheme or lisp.
You should definitely learn both if you can afford the time. They are not redundant with one another, in spite of their superficial syntactic similarity.
Others divide up this space differently than I, but for most purposes, I personally regard them as distinct langauges, not mere dialectal variations, although plainly they are from what I would call the same language family.
You will probably prefer to use one or the other in the end, but they each have things to teach you. Even if you prefer to use neither, you will use the things you learn from these languages in your future thinking, becuase they will give you metaphors for thinking about things that other languages do not.
> Why is lisp a better choice than scheme or viceversa?
I don't like words like "better" in the abstract--better is only a good term when you know the purpose for which you're considering something. Since the purpose is "for you", and I don't know you, I can't answer in the form you're asking. But I'll offer some information anyway, from which you may be able to find your own answer.
Both are fine languages. The choice seems to mostly be made by the personal preferences of the programmer. Different personalities are attracted to features of one or another.
Scheme is more of a single-paradigm language, appealing to people who like to be told there's a single small core of stuff that they need to learn and then they can compose what they need from that. Its design has a strong focus on aesthetic and formalism. For many years, its specification eschewed including detail information such as error handling behavior, portability concerns, branch cuts, etc. because it complicated an otherwise tidily small specification, although of late this has finally begun to change. Overall, though, it's a sort of Republican, nearly Libertarian, approach to language design that assumes languages shouldn't do for people what they can do for themselves. Scheme has tended to prefer a small language core with additional functionality added as libraries. As an example, the Scheme does not have a primitively defined object system, although there are object systems you can load.
CL is a larger language that offers more out of the box, including multiple programming paradigms, and a great deal of baggage the purpose of which is to allow people who program in multiple paradigms to interact gracefully with one another. CL's aesthetics were subordinate in design to pragmatic decisions of various kinds. It has a rich tradition of compromise in its design in order to accommodate a varied community. It's a sort of Democrat / Great Society approach to language design that assumes people are more concerned with getting things done than with fussing over religious notions of finding the single right way to do things, and in some ways makes a kind of art form out the what some might see as the messy aspects of multiculturalism, even to the point of providing specific language features whose sole goal is to allow disagreeing communities to share the same space without being at each others' throats. Common Lisp has a heavily articulated object system (CLOS) and an elaborate error-handling system, both of which are strongly integrated into the standard language.
It's EXTREMELY hard to make any comparison without risking being accidentally critical of one or the other community. I have tried to present both of these paragraphs in ways that show both perceived positives and perceived negatives of both communities, not in order to start a firestorm, but to give you a sense that each community has things they are proud of and things that annoy the other. Looking at the above paragraphs, I'd hope that most people will find that they see a bit of truth in them and moreover that the users of the languages understand that, even if I didn't correctly capture it, there really is something of the general kind I'm describing at work in how the two communities differentiate.
There are other ways to make the decisions, btw. Availability of good texts is an example. There are good books available for both languages, but on unrelated topics, so it's a bit apples and oranges there. I'm sure others have opinions on that, so I'll stop here and will assume others will take up the slack.
(Btw, some people make the decision on the basis of some particular feature they need for some particular application. I assume that's not your issue, though, since you seem to be learning speculatively.)
Kent Pitman wrote: > Others divide up this space differently than I, but for > most purposes, I personally regard them as distinct > langauges, not mere dialectal variations, although plainly > they are from what I would call the same language family.
Are there dialects that you consider to be on or near the border? Do you think of T as a Scheme rather than a Lisp?
Kent M Pitman <pit...@nhplace.com> wrote on 10 Apr 2008 00:5:
> "rig...@gmail.com" <rig...@gmail.com> writes: >> I'm debating whether I should learn scheme or lisp. >> Why is lisp a better choice than scheme or viceversa?
It takes fewer letters to spell "lisp" than to spell "scheme". This can save you much time in your life, depending of course on how often you type those words.
However: some people prefer to write out "Common Lisp" in full, and that of course takes more letters than just writing "Scheme". So, perhaps it depends on preferences.
> Scheme is more of a single-paradigm language [...] > Overall, though, it's a sort of Republican, nearly Libertarian, approach to > language design that assumes languages shouldn't do for people what they > can do for themselves. [...] > CL is a larger language that offers [...] multiple programming paradigms > [...] It's a sort of Democrat / Great Society approach to language design > that assumes people are more concerned with getting things done than with > fussing over religious notions of finding the single right way to do > things, and in some ways makes a kind of art form out the what some might > see as the messy aspects of multiculturalism
I think your overall description of the two languages was on target and helpful. And I appreciate the analogy you tried to make with US political parties.
But I think that the political analogy doesn't really hold up. In some sense, it seems to suggest that if you're the kind of person that prefers Republican (or Libertarian!) real politicians or policies, then you probably prefer to program in Scheme. And likewise, if you have fond feelings towards LBJ, then you probably would prefer programming in Common Lisp.
I don't think those implications hold at all. And not just because an individual may have different preferences as a voter/citizen than they do as a programmer.
In particular, I would say that being "more concerned with getting things done than with [...] finding the single right way to do things" may be a good distinction between Scheme and CL, but is probably a poor way to distinguish Republicans from Libertarians from Democrats.
(See, you were worried about igniting a "political" debate in comparing Scheme with CL, but to simplify you brought in _real_ politics?! How could that possibly be simpler? :-) )
-- Don ___________________________________________________________________________ ____ Don Geddis http://don.geddis.org/ d...@geddis.org It is possible for your mind to be so open that your brain falls out.
Don Geddis wrote: > I think your overall description of the two languages was on target > and helpful. And I appreciate the analogy you tried to make with US > political parties.
> But I think that the political analogy doesn't really hold up.
I thought the comparison was kind of funny given a pretty common view around these parts (ireland, europe, fwiw) that the american republicans and democrats are nigh-on indistinguishable far-right corporate-welfare parties... perhaps just a bit like the way, to someone far outside the general Lisp community, the oh-so-important CL/Scheme differences just aren't particularly clear or relevant compared to the gross similarities that make both recognisably "that weird 'Lisp' thing" to them.
(Ireland has somewhat similar issues really - the two major parties are pretty much indistinguishable mildly-right-of-european-centre split along a historic civil war line, though our proportional representation system at least means other folk get a look in, though not always without selling out somewhat (cough Irish Green Party cough)).
> "rig...@gmail.com" <rig...@gmail.com> writes: >> I'm debating whether I should learn scheme or lisp.
> You should definitely learn both if you can afford the time. [...] > It's EXTREMELY hard to make any comparison without risking being > accidentally critical of one or the other community. I have tried to > present both of these paragraphs in ways that show both perceived > positives and perceived negatives of both communities, not in order to > start a firestorm, but to give you a sense that each community has > things they are proud of and things that annoy the other. Looking at > the above paragraphs, I'd hope that most people will find that they see > a bit of truth in them and moreover that the users of the languages > understand that, even if I didn't correctly capture it, there really > is something of the general kind I'm describing at work in how the two > communities differentiate.
Thank you, Kent! Your posts are one of the reasons why I keep reading comp.lang.lisp so persistently :)
On Apr 9, 9:13 pm, "rig...@gmail.com" <rig...@gmail.com> wrote:
> I'm debating whether I should learn scheme or lisp. Why is lisp a > better choice than scheme or viceversa?
Ideally you should learn both (don't rush learning, take the time you need!).
If this is your first Lisp like language or functional programming language you should start with Scheme.
First read Kent Dybvig's _The Scheme Programming Language, 3rd Edition_ and then read _The Little Schemer_. Do all of the problem in TSPL, read it two or three times. It is a short, wonderful book; you will be amazed at how much you learn with that book.
Get the concepts down quickly with Scheme, and go from there.