"Must-Learn" Languages

Started by
31 comments, last by Hodgman 11 years, 8 months ago
From what I remember, Python isn't weakly typed at all - it will scream to the heavens if you mix types without explicitly converting (exceptions shall rule them all). Actually dying early and loudly is part of the Python motto :) Perhaps you guys meant dynamic? Javascript is weakly typed, but also insanely powerful for scripting. The original Basic is also weakly typed, which made it so great for COM/OLE. IIRC, JavaScript in IE is still implemented via OLE scripting - that is why you used to initialize Ajax requests that way. I think newer versions of IE support the standard XMLHttpRequest.

Like kuramayoko10 said, Prolog is the most different language. Functional programming isn't that different to imperative programming for me (you still think the same way, just use functions for everything), but Prolog almost made me cry until I got it. The total lack of imperative programming concepts such as "if" and "for" is going to teach you a lot about recursion. Some things in Prolog are so much simpler and logical that they would be in an imperative language, that you'd wonder why there isn't a hype over it - like around Haskell, for example.

For DSL-s, I'd recommend to try and learn some build-automation tool, like (n)Ant and MS-Build - it will help you immensely. And since so few people know these tools well, you will stand out at your job :) Also, knowing how to work with documentation is helpful (Javadoc/Qt/doxygen-style commenting + the associated tools vs .net style commenting + MAML) - again, you might be the only one in your team that knows how to build professional documentation in an automated way. Kind of cool :)
Advertisement

Instead of 7 specific languages, I'd give you 7 categories:

A systems language, like C, C++.
A managed language, like Java, C#.
A weakly typed language, like Python, Lua.
A web-server centric language, like PHP, Ruby.
An automation language, like Bash, Batch.
A functional language, like Erlang, Haskell.
A domain-specific language, like SQL, Mathematica.


There is a book called "Seven Languages in Seven Weeks" ...
“Always programm as if the person who will be maintaining your program is a violent psychopath that knows where you live”

Instead of 7 specific languages, I'd give you 7 categories:

A systems language, like C, C++.
A managed language, like Java, C#.
A weakly typed language, like Python, Lua.
A web-server centric language, like PHP, Ruby.
An automation language, like Bash, Batch.
A functional language, like Erlang, Haskell.
A domain-specific language, like SQL, Mathematica.


On my opinion add an Assembler Language to the great list from Hodgman... And the list is complete and perfect :)
Reading, Reading, Reading... why do you read not more?
I have a blog: omercan1993.wordpress.com look there for more content
And I also do some art: omercan1993.deviantart.com
And whats about the Pear3DEngine? Never heard of it? Go and look!
Yeah, and currently I do this: SimuWorld

PS: Please look at this poll on my blog about scripting languages: A opinion poll about scripting language

Like kuramayoko10 said, Prolog is the most different language. Functional programming isn't that different to imperative programming for me (you still think the same way, just use functions for everything), but Prolog almost made me cry until I got it. The total lack of imperative programming concepts such as "if" and "for" is going to teach you a lot about recursion. Some things in Prolog are so much simpler and logical that they would be in an imperative language, that you'd wonder why there isn't a hype over it - like around Haskell, for example.


If you use functional programming like you do imperative programming then you are doing it wrong ™, in functional programming you don't have loops (for/while), nor do you have state (Something that throws most imperative programmers for a loop), proper functional programming is extremely similar to logic programming (both are declarative)
[size="1"]I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!
That was a long time ago - I was learning some dialect of Lisp, and it didn't seem something terribly different. It is also true I didn't try anything difficult, but the mere presence of functions made it a lot easier. They have nothing to do with predicates in Prolog. Arithmetic expressions worked almost as in imperative, you just had to write them in something like reverse Polish notation, with functions all the way. In Prolog, you don't even have that, you have some weird expressions that you use only for predicates, meaning recursion.

It might be different with Haskell, but Lisp was just stateless, nothing that extraordinary. I do remember there were some form of branching (meaning calling one function or the other), while in Prolog you do it with predicates & recursion. And functional is logical, cause stuff happens in the way you tell it to (meaning execution order), while in Prolog you will go crazy with all that backtracking and cuts; you are forced to think on a much higher level. I never had a "wow" moment with Lisp, and with Prolog I was really forced to change the way I think. Which was quite rewarding once I got it.
Wow! So many answers, I will definitely check these languages out, I think I'm probably going to go ahead and start Python after I finish a bit of C++ :)
I have some other questions though:


Is a weakly typed language a "scripting language"? And if not, what is a "scripting language" compared to a weakly typed language?

Is there something wrong with Lisp? How does it compare to Haskell? I own a Lisp a book but I haven't had a chance to give it a good read.

I've been hearing lambda calculus a lot when reading about functional programming. What exactly is it?

Lastly, is functional programming really applicable to games? From what I understand functional programming languages have an inherent lack of state.


So far the responses have been great, thanks to everyone for their feedback! As a side note @dragongame is that book any good? I don't tend to put much faith in the "Do X in Y amount of TIME" books.
Just for this part:

I've been hearing lambda calculus a lot when reading about functional programming. What exactly is it?
Lastly, is functional programming really applicable to games? From what I understand functional programming languages have an inherent lack of state.


Here's John Carmack on the matter: Functional Programming in C++ // a good read not just for C++ programmers

Lastly, is functional programming really applicable to games? From what I understand functional programming languages have an inherent lack of state.


Functional programming can be applied to games and a function can return state and take state as input, it just can't modify or store state, you will need a small imperative portion (the game loop really) but for everything else you can use functional programming.

Functional programming has alot of advantages, one of the major ones for games being that since pure functions always lack side effects (no state) it is relativly easy to write parallel code when you use a functional approach . I don't think functional languages really have a place in games but functional programming does and it is far easier to learn how to do functional programming if you use a language that slaps in you the face when you try to write imperative code. (There are disadvantages aswell ofcourse).
[size="1"]I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

Is a weakly typed language a "scripting language"? And if not, what is a "scripting language" compared to a weakly typed language?
"Scripting language" has different definitions depending on who you ask. Most of what you'd call "scripting languages" are weakly typed, but not all. e.g. I'd consider UnrealScript a scripting language, and it's quite similar to Java.
I'd prefer to call them "extension languages" -- e.g. many games embed a Lua VM into them, for "scripting" the gameplay. Unreal games have UnrealScript embedded into them. WebBrowsers have JavaScript. Blender/Maya have Python, etc... These languages are embedded into an application, for the purposes of extending the behaviour of that application with modifiable "scripts" (another word for "code").
Lastly, is functional programming really applicable to games? From what I understand functional programming languages have an inherent lack of state.
It's challenging if you've spent most of your time writing in non-functional styles, but the lack of state is a huge advantage when it comes to parallelism -- it means that a good compiler can automatically make your code run on many threads (in theory, anyway). Also, despite the 'no state' thing, there's still ways to interact with a stateful environment (such as stdin/stdout), or even "hello world" wouldn't be possible to write!
In the future, these languages may start becoming more popular with games programmers.
I've been hearing lambda calculus a lot when reading about functional programming. What exactly is it?
It's a branch of mathematics, which lets you perform formal reasoning about computations (and functional style code).
http://en.wikipedia....Lambda_calculus
In addition to Hodgman's list, there is also F# which is a functional language, that targets the .NET framework

This topic is closed to new replies.

Advertisement