Hey I have just started learning Lisp and am wondering what real world use it has? Are there any opensource projects that use lisp? Can Lisp be used for designing another programming language? Lisp Challenges for beginners to improve skills?
Last time I had the opportunity to learn Lisp, my brain rejected it.
From what I remember, any Lisp program is a series of lists - and this abstraction blurs the differences between data and code; I guess this helps deal with high complexity?
Lisp is not hard--anyone with a decent book can be writing trivial programs in minutes. That is why it was so popular in schools for years. People pick it up quickly--and educators were able to spend more of their time teaching design techniques and less time teaching syntax.
The downside of lisp is not many people using it. I gave it up because I don't know anyone who uses it--only people who know it. I know it still being used but I have never met any of these people.
The only thing I dislike about it is that it uses prefix notation instead of infix like every other language I've used does (at least, I assume that's common to all Lisps, and not just Scheme, which is the one I'm learning).
Well, I'm with Knuth when he says that programs should be written to be read by people, so I'm in favour of program code which reads like a sentence. My ideal would be something like:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
int n = null
until (n is an integer) and (n > 1), do
n = read integer "Max: "
done
for x from 1 to n, doif x mod 3 == 0, then
print "fizz"
done
if x mod 5 == 0, then
print "buzz"
done
if (x mod 3 != 0) and (x mod 5 != 0), then
print x
done
done
It's kinda verbose, but it's so much easier to read.
Since infix notation comes naturally to so many people, I prefer it based on that.
Incidentally, why do you like prefix so much? The only advantage of it I can think of is that it's a lot easier for computers to parse, but I have to convert from prefix to infix and back in my head which makes it difficult.
Since infix notation comes naturally to so many people, I prefer it based on that.
I'm not convinced it does; I think it only seems that way because that's how we're taught it the first time round.
Additionally, look at languages; in English, subject verb object is "natural". In other languages, these swap around. Native speakers of languages in which the structure is verb subject object might find "plus three two" far more natural, and the subject object verb crowd might prefer "three two plus".
Any language, whether it has real world use or not, is great as it helps you learn new techniques and ways of doing things when you do. I've played with Common Lisp, Scheme, ASM, Perl, Python, Ruby, C, C++, C#, Java, and even web languages PHP, CSS, Javascript, and such.
I agree - learn as many languages (preferably from several very different paradigms) as possible. I'm pretty solid with four (C, C#, C++, Python), comfortable with another four (Javascript, PHP, Bash script, x86 assembly) and I just-about know Haskell and Scheme. During my CS degree (starting December, assuming I get good enough grades) I'll be taught Java (which should be easy, given my background in C# and C++) and a variant of Occam, and probably several other languages.
Native speakers of languages in which the structure is verb subject object might find "plus three two" far more natural
And native speakers of Japanese would find "<you decide> <you decide> <dropping this one because it's implied> verb" easy :P
During my CS degree <...> I'll be taught Java...
that's what they used at my Uni for introduction classes. However, turns out that right when I finished the three classes that used java they started changing the courses to use python.
personally, I think python is a few superior choice for an intro class that's supposed to be teaching students the basic concepts of programming or teaching students to think like a programmer. Less time spent teaching syntax, more time spent teaching general course information.