For several years now, I've had a computer science study programme aimed at learning all the major fields of computer science to approximately the level of a first year graduate student in the field. As part of this project, I've decided that 2007 will be the year of programming languages. During the year I intend to learn six (mostly) conceptually interesting languages(*), spanning as wide a range of programming models as I can manage. I've also picked a book from which to learn each language. If anyone can suggest any more interesting languages or better books, I'd be very open to suggestions.
The six languages (and six books) I've chosen are:
Ruby
I want to learn Ruby for purely pragmatic reasons as it seems to have built up a lot of support amongst people producing innovative web applications, which is just the sort of thing that I do. I intend to use Programming Ruby: The Pragmatic Programmer's Guide by Thomas, Fowler and Hunt, mostly because I really enjoyed reading Thomas and Hunt's The Pragmatic Programmer. An alternative is Python but for reasons that I can't articulate that seems like a less appealing prospect.
Smalltalk
Smalltalk is perhaps the purest and most elegant of the object-oriented languages, and I've also heard a lot of intriguing things about its development environment. I used to think that I was pretty good at object-oriented design but recently I've realised that I'm only really an amateur. It's a programming paradigm that I really want to master. The book I've chosen, Liu's Smalltalk, Objects and Design, sounds like it has a strong emphasis on design.
Haskell
I've always wanted to learn functional programming properly but haven't ever written any programs in functional languages except for some toy programs in ML back in my Cambridge days. Purely functional languages are going to become increasingly important as we move deeper into the era of multicore computers. Haskell is apparently the nicest functional language and once again I've chosen a book that uses the language as a medium for teaching the deep principles of the programming paradigm: Bird and Wadler's Introduction to Functional Programming
Erlang
Another approach to exploiting extremely multicored computers is writing explicitly concurrent programs with large numbers of communicating threads. Erlang is a language with primitives for threading and message passing, and it's somewhat famously been used in large production systems for telecommunications applications. In this case the book I've chosen, Concurrent Programming in Erlang by Armstrong, Virding, Wilkstrom and Williams, is simply the only one I could find on the language. Possible alternative: OCCAM.
Prolog
I've never learned logic programming either. In this field, Prolog seems to be the most popular candidate language. I remember not making much sense of this during my Diploma, but Programming Language Pragmatics has helped a lot. Bratko's Prolog Programming for Artificial Intelligence looks like one of the best books on the language. I'm not sure if there are any more modern logic languages that might be more worth learning. I'll have to try to find out.
LISP
Finally, LISP, an ancient language that has recently come back into fashion (amongst ideologues at least). LISP has the reputation of being a language that causes almost religious epiphanies and flashes of enlightenment in programmers who learn it, which sounds rather fun. To balance the fact that it's the most abstract language in my list, I've chosen a book explicitly focused on applications: Seibel's Practical Common LISP
(*) Conceptually challenging computer languages, clearly. If I were choosing natural languages to master I'd probably pick Akkadian, Egyptian, Greek, Latin, Arabic and Persian in my first round.
November 29 2006, 22:46:22 UTC 5 years ago
I would recommend Scheme over Lisp as it's rather cleaner.
Generally I would pick Haskell, Ruby and Scheme as higher priority than Smalltalk, Erlang and Prolog, simply because they seem to be more popular and have more active communities.
November 29 2006, 23:01:01 UTC 5 years ago
So if I went with Scheme, would The Structure and Interpretation of Computer Programs be a good book to use? I've been intending to read it for years anyway.
Another attraction of Smalltalk is that Objective-C's object-oriented extensions to C are derived directly from it. Which reminds me that I must find a cute small project to motivate me to learn Objective-C and the Cocoa APIs too...
November 29 2006, 23:49:31 UTC 5 years ago
I don't know about books. I've never learnt a computer language by reading a book about it. I own no Haskell books, for instance (unless I do and I've completely forgotten about it). I always have some little project that I try to solve with the language, and then look stuff up in the reference documentation as needed.
From your userpic I'm guessing you know Dylan. I don't know Smalltalk, so I'm wondering how it stacks up against Dylan's generic function/method approach for the title of "most elegant of the object-oriented languages". Smalltalk has a prototype-based notion of class, doesn't it?
December 5 2006, 22:00:22 UTC 5 years ago
I don't know Dylan and in fact hadn't even heard of it (my userpic is modelled on the glass tile coasters that I have on my desk). I know next to nothing about Smalltalk but I'm pretty sure it uses classes (which each class also being an object of a metaclass) and not prototype objects.
So is Dylan something I ought to have a passing familiarity with too?
December 5 2006, 23:12:42 UTC 5 years ago
Yes, you should definitely have a passing familiarity with Dylan. Apple originally created it in the early 90's but it got terminated a few years later, though there are now open-source compilers for it and an active community. The language features multiple inheritance and multiple dispatch on function arguments by using "generic functions" (with general argument types) and methods that implement them (with more specific types).
November 30 2006, 00:00:52 UTC 5 years ago
i'd thoroughly recommend SICP! and I'd recommend reading it before any of the other books, because it's as much about clear-thinking and solving complex problems by redefining them, as it is about learning Lisp/Scheme. i'm a much better programmer for reading it, and i just can't *squee* enough about it. :)
December 5 2006, 22:03:37 UTC 5 years ago
November 29 2006, 22:50:30 UTC 5 years ago
(Of that list, Prolog was the only one taught in the first year at Warwick.)
Either that or I just don't remember actually learning the languages I used, which is also possible.
November 29 2006, 22:55:57 UTC 5 years ago
I think, for example, that getting really good at SQL had a much stronger effect on the way I approach problems than learning C# at about the same time did.
November 30 2006, 00:07:46 UTC 5 years ago
(yes, I read your last paragraph) ;p
Mwah!
November 30 2006, 06:11:06 UTC 5 years ago
:P
November 30 2006, 07:53:00 UTC 5 years ago
:p
November 30 2006, 11:03:17 UTC 5 years ago
Lol!
(it's not just you)
November 30 2006, 04:34:01 UTC 5 years ago
November 30 2006, 12:15:53 UTC 5 years ago
My list of languages ended up being:
Ada - its focus on safety interests me; I've spent too much time tracking down obscure bugs in C programs.
D - out of the various attempts to "fix" C/C++, this one looked the most interesting to me.
Common Lisp - the Lisp family is unique... the reason for me to go with Lisp over Scheme is the availability of good compilers.
Ocaml - seemed the best choice for learning a functional language while still getting good execution speed.
Eiffel - covers both a purely object-oriented language and the design-by-contract philosophy. Smalltalk was one of my alternatives for OO, but again, seemed to lack in terms of execution speed. Plus, design-by-contract interests me.
Forth - as a fan of RPN on calculators, Forth caught my eye :) Looks weird, and I am dubious as to how useful it is... but would still like to learn it a bit.
Mercury - I definitely wanted to improve a logic programming language; Mercury seemed like a good alternative for combining the logic programming language paradigm and reasonable performance. Perhaps there exists good Prolog compilers - but my experience with Prolog from when I did CS is that it was painfully slow.
November 30 2006, 12:27:52 UTC 5 years ago
Ocaml seems to only have one book for it, so that makes the choice easy :) "Practical Ocaml" by Joshua Smith.
Eiffel got a few promising books; I have for now set my aim at "Object-oriented programming in Eiffel" by Peter Thomas & Raymond Weedon - but that is a semi-random choice from reading about the books at various online bookshops; any input from somebody who has actually read an Eiffel book would be welcome.
For Ada, I have purchased a swedish book, Jan Skansholm - "Ada från början", which is also around in english translation. On the balance, I would recommend against it though for two reasons; it starts at too much of a basic level, and it doesn't introduce Ada's OO features until right at the end. Apart from this, it seems to be a good book, covering most of Ada's interesting features in a well-organized manner. I am considering aquiring "Programming in Ada 2005" by John Barnes, as its previous editions (covering Ada 95) seems well-received, and it seems to be one of the few books actually covering Ada 2005 in a good manner.
Forth is problematic - as the language is obscure, most books I have found regarding it are old or specialized; I doubt how useful they would be.
Mercury and D have as far as I've found no books dedicated to them; for D, I would trust my experience with C, etc., plus the documentation on the web. For Mercury, I have a Prolog book lying around, and hope the online documentation would be sufficient to get me going.
Anonymous
December 5 2006, 14:29:52 UTC 5 years ago
http://norvig.com/paip.html
Anonymous
December 5 2006, 17:08:34 UTC 5 years ago
One of the reviewers was the compiler main developer.
December 5 2006, 22:05:14 UTC 5 years ago
November 30 2006, 04:38:27 UTC 5 years ago
November 30 2006, 15:49:39 UTC 5 years ago
November 30 2006, 17:50:45 UTC 5 years ago
I don't know jack about any of this stuff, just know who's talked about what in my presence (real or virtual).
December 5 2006, 03:47:56 UTC 5 years ago
Ruby and Smalltalk are pretty similar under the surface. You could probably merge them. Of the two, Smalltalk is probably a better head trip. Ruby is a practical language. The rest of your list strikes me as very theoretical. Ruby is not theoretical. It's shockingly pragmatic. :)
I think it's wise of you to learn both Haskell and Lisp. You'll really see the breadth of functional programming that way. I think they are more-or-less equivalently powerful, but some things are clearer with Lisp and other things (most things) with Haskell. And the syntax is choice. I would actually recommend Lisp over Scheme because of unhygienic macros, but DrScheme is a great joy to use and has tons of libraries. I learned from "The Little Lisper," which is actually about Scheme, but as another commenter has mentioned, SICP is an excellent text. It's also free now.
Prolog is also a head trip. A good call. It's hard as hell to get anything done in Prolog though, except for certain problems for which it's a real dream.
If anything, I would probably substitute Io for Ruby. That way you could get a taste of a prototyping OO language as well as a class-based one. But you aren't going to get to see multiple inheritance with this list, nor will you get to see "dot" operator OO languages (since Io uses Smalltalk's "space" operator). For MI, I would recommend Eiffel, but Eiffel is very dry. By which I mean, you fall asleep using it. "Object Oriented Software Construction" is a classic.
Erlang I am learning myself and enjoying. It uses a nice variation of Prolog's syntax. And of course the parallelism model is very simple and very powerful, unlike most other parallelism models. Io has an actor parallelism model which is also quite powerful. Knowing both Io and Erlang would give you a good taste of two superior parallelism models (compared to threads).
As for natural language, I think your list is heavily slanted towards Semitic languages; I would probably go for Egyptian, Sanskrit, Finnish, Arabic and Chinese (I am already learning Hebrew). I have a thing for Finnish. :)
Best of luck to you in your research!
December 5 2006, 22:44:36 UTC 5 years ago
I may add Io to the list. There's no rule that says that it has to be six languages after all; six just seemed a nice number. I think I might try to find time for Icon too as that looks quite interesting.
I already know PHP and C#, and I've written some toy programs in Java so I've seen my fair share of "dot"s already.
My list probably is a bit slanted towards Semitic languages - I have two of them in a list of six - but I wasn't aiming for a balanced spread of languages. Instead, I was choosing languages based on literature that I'd like to be able to read in the original languages (except for Persian, which just sounds interesting). I'd quite like to learn Sumerian (which isn't Semitic) too and might be convinced to learn that instead of Akkadian. Of course, I'll never find time to learn even one of those languages, alas.
December 5 2006, 16:55:48 UTC 5 years ago
http://en.wikipedia.org/wiki/Oz_program
http://www.info.ucl.ac.be/~pvr/book.htm
Finally, if you're interested in static types, there's Alice ML, which is basically Oz semantics implemented as an extension to SML. Alice also has a more modern looking graphical environment that's very easy to setup.
http://www.ps.uni-sb.de/alice/
And most of the CTM examples in Alice:
http://www.codepoetics.com/wiki/index.p