Richard Baker ([info]sharp_blue) wrote,

Six languages

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.

Tags: computers

  • Post a new comment

    Error

  • 25 comments

[info]ashley_y

November 29 2006, 22:46:22 UTC 5 years ago

Eep, your paragraphs nest with my relatively small font size.

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.

[info]sharp_blue

November 29 2006, 23:01:01 UTC 5 years ago

Oh dear. I think that's because I have floating images without the h3s being set to clear. I did that because I was having some difficulties with the quite complex new tableless layouts over at my main weblog.

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...

[info]ashley_y

November 29 2006, 23:49:31 UTC 5 years ago

Layout looks better now, thanks.

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?

[info]sharp_blue

December 5 2006, 22:00:22 UTC 5 years ago

I've never learnt a language by reading a book about it, although I have learned a bit about language implementation that way. I'm really looking for books that are to each of those programming paradigms what Design Patterns is to object-oriented programming. Also, I think I ought to spend a little less of each day staring at a screen, although I'm not entirely sure why staring at paper is a more appealing prospect for the moment.

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?

[info]ashley_y

December 5 2006, 23:12:42 UTC 5 years ago

You're right about Smalltalk, I was thinking about Self, which I think does use prototypes.

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).

[info]archie

November 30 2006, 00:00:52 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'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. :)

[info]sharp_blue

December 5 2006, 22:03:37 UTC 5 years ago

Okay, I'll add SICP to my list too, or at least skim the free online version. Thank you.

[info]arafel2

November 29 2006, 22:50:30 UTC 5 years ago

For what it's worth, I don't think most CS undergraduate degrees use quite so many languages, and certainly not so many with a bias towards that level of abstraction.

(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.

[info]sharp_blue

November 29 2006, 22:55:57 UTC 5 years ago

The Cambridge Diploma in Computer Science taught Modula-3, Java, C, ML and Prolog. But I'm someone who's generally in favour of abstraction and in any case I already know enough standard-issue procedural languages that while I don't think learning another would be at all difficult I also don't think I'd gain as much from doing so as I would by learning something a bit more exotic.

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.

[info]black_tulips

November 30 2006, 00:07:46 UTC 5 years ago

I think you should learn Swedish.

(yes, I read your last paragraph) ;p

Mwah!

[info]kalashnicough

November 30 2006, 06:11:06 UTC 5 years ago

Nah, learning Swedish is pointless. Everyone in Sweden speaks English really really well. Especially bus drivers.

:P

[info]black_tulips

November 30 2006, 07:53:00 UTC 5 years ago

But they do! It must just be you.

:p

[info]tinyameliakitty

November 30 2006, 11:03:17 UTC 5 years ago

Especially bus drivers.

Lol!
(it's not just you)

[info]tinyameliakitty

November 30 2006, 04:34:01 UTC 5 years ago

Hmm, unic [info]enhorning is trying to get going with learning some new languages at the moment, maybe you two should talk to each other, I know he was a bit unsure which books would be the best ones to use. Some languages he was interested in were Ada, Eiffel, OCaml and LISP. He uses programming mostly for writing AI for abstract games - Othello and others.

[info]enhorning

November 30 2006, 12:15:53 UTC 5 years ago

... yeah, I was wanting to learn languages for similar reasons - conceptually interesting languages. However, due to my interest in AI for abstract games, execution speed was an important consideration as well.

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.

[info]enhorning

November 30 2006, 12:27:52 UTC 5 years ago

Oh, and for books, I decided against "Practical Common Lisp" due to its focus on building an application of a type I have no interest in - I would much rather get a book more aimed at using Lisp for various types of AI. Not knowing which such book to get, I have settled upon "The ANSI Common Lisp Book" by Paul Graham, which seemed to get good reviews and comments online.

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

For AI/Lisp get this book:

http://norvig.com/paip.html

Anonymous

December 5 2006, 17:08:34 UTC 5 years ago

I read bad reviews about "Practical Ocaml" in Amazon and other sites. Maybe you should consider "OCaml for Scientists". http://www.ffconsultancy.com/products/ocaml_for_scientists/
One of the reviewers was the compiler main developer.

[info]sharp_blue

December 5 2006, 22:05:14 UTC 5 years ago

That's an interesting list, especially Eiffel and Mercury. Thank you :)

[info]memetic_glutton

November 30 2006, 04:38:27 UTC 5 years ago

FWIW, we learned Haskell and Turing in the first year at Imperial. I think we did Prolog and Java in the second year.

[info]xach

November 30 2006, 15:49:39 UTC 5 years ago

That book (Practical Common Lisp) is dead sexy.

[info]made_of_paradox

November 30 2006, 17:50:45 UTC 5 years ago

Mark Chu-Carroll might have some advice on the Haskell. :)

[info]hdan might or might not have advice regarding Smalltalk.

I don't know jack about any of this stuff, just know who's talked about what in my presence (real or virtual).

[info]fusiongyro

December 5 2006, 03:47:56 UTC 5 years ago

Hmm. Well, I'm nobody important enough to leave a comment, and this is a *great* list. But...

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!

[info]sharp_blue

December 5 2006, 22:44:36 UTC 5 years ago

Thank you :) Also, I wasn't aware that there was a policy that only important people are allowed to comment on my journal.

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.

[info]billthecat

December 5 2006, 16:55:48 UTC 5 years ago

You should take a look at the book Concepts, Techniques and Models of Computer Programming (CTM). It's a bit more obscure than SICP, but it covers most of the same ground. One of the differences is that it uses the Oz programming language, which is a multiparadigm language. It describes the core ideas of the languages you've listed and shows how they can all be built up from a minimalist core language.

http://en.wikipedia.org/wiki/Oz_programming_language

http://www.info.ucl.ac.be/~pvr/book.html

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.php?Title=Topics:CTM_in_other_languages:Alice_ML
Create an Account
Forgot your login or password?
Facebook Twitter More login options
English • Español • Deutsch • Русский…