views:

335

answers:

18

I am a university student who is going to be taking a programming language course in the upcoming semester. One of the course requirements is to specialize (for the course) in a language in which you have no prior experience and is not covered in the course. I've begun looking through lists of languages, but I would like to get some feedback and maybe find out about some languages that I may not be aware of.

Languages that have been rejected/I know:

  • Java (University favorite)

  • (Lisp (taught in the course, more specially Scheme) (and I'm already learning it)))

  • Assembly (taught in Comp Org)

  • BASIC (apparently, too... basic...)

I've considered learning Haskell or VB6, but I still feel like there are languages that might be more useful to my thought process that I have overlooked. I appreciate all feedback and hope this isn't too subjective.

EDIT: My personal objectives for the course are either to experience a paradigm that would be both challenging and useful to my thought process in future coding (eg. functional, etc), or to study a language that would give me a deeper understanding of interpreter/compiler theory and the transition between Assembly and high level code (eg. C).

I'm strongly considering grad school and research as career choices, but that doesn't prevent me from understanding the benefit of legacy languages and languages used in commercial settings. Any information about languages used in AI programs would be especially welcome, though.

+8  A: 

Why not go for Erlang?

Intro from wikipedia:

Erlang is a general-purpose concurrent programming language and runtime system. The sequential subset of Erlang is a functional language, with strict evaluation, single assignment, and dynamic typing. For concurrency it follows the Actor model. It was designed by Ericsson to support distributed, fault-tolerant, soft-real-time, non-stop applications. The first version was developed by Joe Armstrong in 1986.1 It supports hot swapping thus code can be changed without stopping a system.2 Erlang was originally a proprietary language within Ericsson, but was released as open source in 1998.

While threads are considered a complicated and error-prone topic in most languages, Erlang provides language-level features for creating and managing processes with the aim of simplifying concurrent programming. Though all concurrency is explicit in Erlang, processes communicate using message passing instead of shared variables, which removes the need for locks.

Kyle Rozendo
The thing I really found interested about Erlang is the threads. I can't find the article I read recently about Erlang's thread creation/destruction speed, but here's an older one that had similar results: http://www.sics.se/~joe/ericsson/du98024.html
Brendan Long
I agree. I think that when learning another language, one of the most important criteria is (without resorting to bf and the like) how *different* the language from what you know. Given the three primary programming models (procedural/turing, functional, actor), Erlang is probably the most mature Actor language available.
kyoryu
+5  A: 

C# sounds classic - you don't know it, and it's in wide use, so it could help you in your resume. I would also consider Ruby, but I would rule out VB6 (obsolete).

Nir
C# is almost identical to Java though.
Brendan Long
+1 for ruling out VB6.
Zaki
I agree with Brendan here. Not from a point of view of the languages being the same, but of the general way things work being the same.
Kyle Rozendo
+1 for C#. (5 more to go...)
CesarGon
A: 

I guess it comes down to what you want to learn and how far you're willing to go with it. I've always had a soft spot for Java, I think probably because it's a fun language to learn and if you're coming from a background in which you might not know a lot about OOP then it also provides some great core foundations as far as a language goes.

cdnicoll
Except Java is first in the list of languages they already know..
Brendan Long
+6  A: 

What about C? It's similar enough to Java that you won't spend much time on syntax, but different enough that it'll be hard. Also, it's still one of the most commonly used programming languages (read: You'll need to learn it someday anyway).

Brendan Long
+2  A: 

How about F# which runs on the .Net framework.

Zaki
+3  A: 

Every language is useful (even GolfScript... just kidding)

I would recommend to you any (and all) of

  • C
  • C++
  • C#

because these languages are very versatile and enjoy widespread use.
Note that while sharing the same single letter in their name and some syntactical similarities each of these languages expose very distinct semantics, characteristics and purposes. This is even true of C and C++ which belong to the same "family" and are often referred as C/C++.

Although quite distinct individually, the languages in this series offer a incomplete but insightful "summary" of the "evolution" of imperative programming and an introduction to some key paradigms and concepts.
The word "Summary" is used loosely here, since many of these concepts predated even the C language, albeit not in a mainstream fashion. In addition, "Evolution" shouldn't be understood in its usual sense of linear progress toward the better and where the new replaces the old.
Anyway the snapshot of this evolution within mainstream languages can be listed as follows

  • with C:
    pointers,
    an abstraction of assembly language,
    small but useful runtime library serving the few fundamental types and utilities of the days (mainly string manipulation, FILE I/O, math functions, explicit memory management)

  • with C++
    object oriented programming,
    templates,
    "built-in" support for common data structures and containers,
    exception handling,
    some type safety (mainly enforced at compile time)

  • with C#
    automatic memory management,
    extensive "standard" and "extended" libraries (reflecting the the extreme variety and breadth of systems and technologies associated with modern applications: XML, Internet protocols, Event driven frameworks, database access, Design Patterns, to name a few)
    bouts of functional programming,
    strong typing, including at runtime,
    reflection / introspection,
    somewhat blurred distinction between language and frameworks.


Edit note:
My original intent in editing this answer was to clarify the fact that C, C++ and C#, are effectively very distinct languages. The idea that the series constitutes an approximate and somewhat insightful summary of mainstream programming in the last 35 years imposed itself to me while I was thinking about these languages. I apologize to Petr Peller for expanding well beyond what may have been the intent of his original post; please feel free to revert the edit and/or otherwise change it, if this doesn't fit your liking!
Cheers,
-mjv-

Petr Peller
Please define "C family"... The three Cs I'm thinking about are quite different languages, in my opinion, and share mostly syntactical similarities but are otherwise rather distant parents.
mjv
C,C++ and C# are different languages but each has it's use. Learning any (all) of them worth the time. I searched wiki and I think I misused the "C family" term. http://en.wikipedia.org/wiki/Category:C_programming_language_family
Petr Peller
+14  A: 

Ruby. It's pure OO and has some great features you don't readily find in other languages such as code blocks, mixins, and a great meta-programming API. It's Computer Science classy, your profs will love your pick.

Chris
Great pick for a language.
fastcodejava
Not to mention it would be nice to add a scripting language to your repertoire, and it would be a great lead in to Ruby on Rails should you choose to pick that up later.
Zachary
+2  A: 

When I studied at university we started out with Lisp, which I thought was really odd (I had done a lot of programming before starting university). After a few weeks a started to see the elegance of Lisp - the syntax of the language is extremely simple, leaving focus on the algorithms and concepts. Cenceptually Lisp is a functional language, compared to the imperative languages mostly used, which forces another mindset when programming.

For me personally the understanding of programming concepts that I gained from the Lisp course has been exteremely valuable in all development work in various languages I have done since then, so my vote is for Lisp.

Anders Abel
Actually I'm learning Lisp on my own time already. I'm thinking about specializing in AI and I've heard that alot of projects in that field use Lisp in some form or fashion.
WLPhoenix
+4  A: 

Another interesting language might be Smalltalk.

kyoryu
+1 Smalltalk totally sharpended my way of thinking in terms of OO...
Mef
+2  A: 

You could try specializing in COBOL for the course. Yes, I understand COBOL is old-school, but hear me out.

It presents an interesting real-world application in that many older systems used by businesses are still written in it, and the businesses have no reason to change that – the code still functions. However, the people who wrote the code back in the 1970s-80s are retiring from the industry. That creates large volumes of unsupported code, code you might just find yourself having to maintain one day in an industry setting.

You could use OpenCOBOL as your compiler. It's available here: http://www.opencobol.org/

Micah
COBOL has very little to teach from the conceptual standpoint. The only reason to learn it is if you're going to use it, and somebody interested in going into research is unlikely to use it.
David Thornley
+1 for suggesting something no one else would ever dare suggest!
Mongus Pong
A: 

I see that you didn't mention Python -- but if Haskell is too conventional for you, you might want to look elsewhere.... Actually, I recommend trying Haskell for the type system alone, which makes everything that isn't a modern functional language look sick by comparison.

You might consider a stack-based language like Forth or Postscript. That's quite a bit different from everything mentioned above.

comingstorm
A: 

If you have access to a Mac, try Objective-C perhaps? The dev tools are all free, and it's a useful skill to have for possible future iPhone work too.

Coxy
One can learn Objective-C easily without access to a Mac. gcc includes an Objective-C compiler since forever (and if I remember correctly, then even Apple used that one). It is more useful in a Mac-environment, however.
Joachim Sauer
@Joachim Sauer: true enough, but I would argue that without access to a Mac, learning Obj-C is frivilous/useless.
Coxy
A: 

can't be wrong using Javascript/ECMAScript!

go to developer.yahoo.com/yui/theater/

and watch Douglas Crockford's js videos

Dapeng
+1  A: 

Consider Scala.

It's probably the 'most multi-paradigm' language, in a sense that it includes more unrelated concepts than any other 'real' language. Not something you'd want to use at a job, but it should be great for learning - because if you master it, few things could surprise you later.

ima
Decided to learn Scala for personal use instead of Java. Seems like a good language, all though I'm kinda nervous about the hodge-podge of features.
WLPhoenix
+3  A: 

Now that you've explained your objectives, thank you, I'll weigh in:

Learn one (or more if you want to) of Haskell, Lisp or ML, in that order of preference. Any of these will hit your objectives -- challenging you to think about programming in a new way, and all or any of them is ideal for implementing compilers (see SICP, Appel's Implementing a Modern Compiler in ML).

Functional languages are (rightly in my view) much used in academia for their nice properties. I think that Haskell is the hot one right now. Jump on the bandwagon, the ride will be interesting and be good preparation for graduate work.

High Performance Mark
+2  A: 

When I took programming languages I had to learn 6 new languages, so to be honest you are getting off pretty easy.

I think you should choose something that has market value. I think most programming language courses are taught by Junior year, so the fact that you have no experience with C is a bit troubling. You already know java, so I really wouldn't focus on C#. You likely don't know any logic languages like Prolog, but it is not very marketable. So my list in order of most importance would be

C

ML

Erlang

Prolog

Python

Recursion
Easy for the course perhaps, but that doesn't stop me from learning more languages in my own time. I'll agree with you by saying that the CS program isn't near as strong as I'd like for it to be. All the better to get advice so I can expand my knowledge on my own.
WLPhoenix
Somebody who's thinking of going to grad school and into research shouldn't worry about what languages are marketable now. On the other hand, I do like your list.
David Thornley
I guess I missed the part about grad school. Now I really think C, because it will be a necessity for him to get a true understanding of whats going on below. But c isn't a very hard language to learn or use, just a hard one to use properly. Im sure when you take your OS class or two, you will learn C, many schools do it this way. Best of Luck.
Recursion
+1  A: 

C for a staple programming language. Erlang or Haskell for something out of the ordinary. J or K for complete WTF.

You might also want to consider Like, Python. An excerpt:

#!usr/bin/python   uh from sys import exit
# Grab the user's name.    
ok so like name = raw_input("yo! what's your name?" ) right

# Make sure they entered something, then say hi.   
if name.strip() is actually like "":
     toootally just exit()   
else:
     um yeah
     print like "Hi %s, nice to meet you." % name
A: 

For a learning experience, you can't beat CLU. This is the work that Barbara Liskov got the Turing Award for. Her team solved a bunch of problems that are still relevant today, and as has been said about Algol 60, CLU was an improvement on most of its successors.

A good way to dip your toe in the water is to read an early paper by Liskov and Zilles, although keep in mind that the static type system had not yet been developed, and that's one of the more interesting pieces.

Norman Ramsey