Jump to content

  • Log In with Google      Sign In   
  • Create Account


"Must-Learn" Languages


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
32 replies to this topic

#1 SharkBaitHooHaHa   Members   -  Reputation: 271

Like
6Likes
Like

Posted 09 August 2012 - 09:58 PM

Hello everyone!

I've been programming with Java for a while now and become quite comfortable at it. I just recently I started to pick up C++ to expand my knowledge a bit. One of the main reasons I chose C++(and I realize C would've qualified too) was because it dealt with pointers, and coming from Java it was a topic I felt I should learn considering the fact that I have hardly any control over memory in Java. Then I got to thinking, "Hey, there are some languages that benefit programmers not only with the possibilities of new libraries, capabilities, etc, but also with new programming insights"

So here I wanted to ask you guys for your opinions on this:


*Which languages offer these programming insights to those that learn them?*

*What are the insights that those languages offer?*

*What is the "must-learn" set of languages any programmer should learn if you had to limit them to around five or seven?*


I'm really interested to see which languages people choose and with which arguments they back them up(hopefully without an ensuing language war).

Thank you for your feedback! I'll snag some of the suggestions and pick up books on those languages to learn after I finish reading up on C++ :)

Sponsor:

#2 Alpha_ProgDes   Crossbones+   -  Reputation: 4688

Like
0Likes
Like

Posted 09 August 2012 - 10:10 PM

If you're learning Java then learn Clojure. You should always learn a imperative and a functional language. It's late and honestly, I'm too tired to go into detail. But I certainly will tomorrow.
Beginner in Game Development? Read here.
 
Super Mario Bros clone tutorial written in XNA 4.0 [MonoGame, ANX, and MonoXNA] by Scott Haley
 
If you have found any of the posts helpful, please show your appreciation by clicking the up arrow on those posts Posted Image
 
Spoiler

#3 Hodgman   Moderators   -  Reputation: 29759

Like
30Likes
Like

Posted 09 August 2012 - 10:14 PM

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.

[edit]This is a good 8th category:

In my opinion add an Assembler Language and the list is complete

And if you want a 9th, try a logic language, like Prolog.

Edited by Hodgman, 10 August 2012 - 06:51 PM.


#4 scyfris   Members   -  Reputation: 168

Like
1Likes
Like

Posted 09 August 2012 - 10:28 PM

I deal almost exlusively with C/C++ code, and I have done Java. I will say that learning C or C++ will expose you to core programming fundamentals (such as memory management, allocations on stack vs heap, object-oriented design, etc). I love Java for what it is, but I think if you are really looking to learning programming techniques which extend over all platforms, C or C++ would be a good choice for your projects. EVERYONE needs to know about pointers, and IMHO everyone needs to know about dynamic memory allocation and stack vs heap allocation. With C and C++, it is impossible to do any amount of coding for too long without running into memory leaks, stack/buffer overflows, segfaults, etc. These bugs are the bain of programming existance because they are very difficult to debug. Sometimes days can be wasted before tracking down a hard-to-find memory leak. That being said, the experience of having and fixing these bugs is something you will need if you want to be a serious programmer.

Learning at least one scripting language is good as well. Scripting languages are built to make programmers' and users' lives MUCH easier by allowing you to write scripts to perform menial tasks, or tasks in which programming Java or C++ would be overkill. Tasks that rely on using native system commands are good candidates. I would recommend Perl or Python since these two are highly documented. highly used languages. Also, knowing a scripting language is good if your looking for jobs in industry, or if your looking to make your life easier. From a learning perspective, these will show you how easy high-level interpreted languages can make your life. Learning C/C++ will make you appreciate these languages even more.

#5 jbadams   Senior Staff   -  Reputation: 18220

Like
0Likes
Like

Posted 09 August 2012 - 10:54 PM

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

Language categories

I was going to make a recommendation very similar to this one, so rather than repeating it I'll just quote for emphasis. You're spot-on with the idea that other than possibly being directly applicable there can be value in learning new languages in order to expose you to different ways of thinking about how to solve any given problem; you'll get the most bang-for-your-buck in this area by learning different types of languages rather than necessarily any specific languages. From there it's a relatively trivial exercise to learn the syntax and familiarise yourself with the standard library and idioms of any language you plan to actually use for production.

I would add that it is also a very valuable learning experience to implement an interpreter or compiler. Bonus points if you at some point design your own language -- even if it's just a "toy" language -- rather than simply implementing an existing one.

#6 doeme   Members   -  Reputation: 700

Like
3Likes
Like

Posted 10 August 2012 - 02:32 AM

Regarding your question

*What are the insights that those languages offer?*


Applying this to Hodgman's list, here is my opinions about the key insights and as well as some parings which languages go closely together, because you will only get some insights when you see how it is done differently in another language

A systems language, like C, C++ : How your code behaves on a low level and stuff like memory-management
as opposed to
A managed language, like Java, C#: which will let you concentrate on object oriented programming, using frameworks and applying patterns without needing to worry about all those C/C++ pitfalls

A weakly typed language, like Python, Lua: seeing how to bring Ideas quickly into code, how to create "quick'n'dirty" but still maintainable code.
in conjunction with:
An automation language, like Bash, Batch. to easily automate tasks (and recognizing which task are easily automated) without needing to use a full-blown language


A web-server centric language, like PHP, Ruby: The peculiarities of web-development, thinking in multi-tier.software-architecture and asynchronous user-interaction
together with SQL to get a feel of
A domain-specific language, like SQL, Mathematica: The insights will be very domain-specific rather than general, so I would pick a language that is in a domain that interests you. Knowing stuff like that never hurts.

And last but not least
A functional language, like Erlang, Haskell: to see how to code "the other way", meaning non OOP

#7 Malabyte   Members   -  Reputation: 589

Like
0Likes
Like

Posted 10 August 2012 - 05:54 AM

I'm aiming for a pretty hardcore career (game development SpecOps Posted Image), but here's nonetheless my own learning plan over a 10-year-period:


Assembly etc:
- Binary and assembly (Win & Mac) basics.
- Researching C-- and similar.

High-end programming:
- HTML/XML, CSS, PHP & MySQL stuff. (For my website which will hold all my projects.)
- Javascript OR Actionscript basics
- Java
- C, C++ and C#
(Plus whatever other languages that may pop up as relevant.)

Design:
- Paintshop Pro (images; for both game and photography stuff)
- CuBase (sound)
- 3DMax (modeling)
- LATEX (writing)


Just the hard core of development tools, really. Posted Image

Edited by DrMadolite, 10 August 2012 - 06:05 AM.

- Awl you're base are belong me! -

- I don't know, I'm just a noob -


#8 SimonForsman   Crossbones+   -  Reputation: 6067

Like
3Likes
Like

Posted 10 August 2012 - 07:54 AM

And last but not least
A functional language, like Erlang, Haskell: to see how to code "the other way", meaning non OOP


Functional programming isn't just non OOP, the big difference is that Functional programming is declarative rather than imperative. (There are plenty of non OO imperative languages, C, Pascal and BASIC for example (and they are fairly similar to their OO relatives (C#, Delphi, VB, etc).
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!

#9 Alpha_ProgDes   Crossbones+   -  Reputation: 4688

Like
0Likes
Like

Posted 10 August 2012 - 09:06 AM

I would add that it is also a very valuable learning experience to implement an interpreter or compiler. Bonus points if you at some point design your own language -- even if it's just a "toy" language -- rather than simply implementing an existing one.

Is it considered cheating if you use a Lisp-like language to do so? :D
Beginner in Game Development? Read here.
 
Super Mario Bros clone tutorial written in XNA 4.0 [MonoGame, ANX, and MonoXNA] by Scott Haley
 
If you have found any of the posts helpful, please show your appreciation by clicking the up arrow on those posts Posted Image
 
Spoiler

#10 kuramayoko10   Members   -  Reputation: 386

Like
1Likes
Like

Posted 10 August 2012 - 09:44 AM

To complement the paradigms cited above:

Functional: R, Haskell
Logic: Prolog
Programming is an art. Game programming is a masterpiece!

#11 dilyan_rusev   Members   -  Reputation: 923

Like
1Likes
Like

Posted 10 August 2012 - 10:03 AM

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

#12 dragongame   Members   -  Reputation: 538

Like
0Likes
Like

Posted 10 August 2012 - 10:38 AM

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”

#13 omercan   Members   -  Reputation: 370

Like
3Likes
Like

Posted 10 August 2012 - 12:00 PM

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

#14 SimonForsman   Crossbones+   -  Reputation: 6067

Like
1Likes
Like

Posted 10 August 2012 - 01:26 PM

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)

Edited by SimonForsman, 10 August 2012 - 07:47 PM.

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!

#15 dilyan_rusev   Members   -  Reputation: 923

Like
0Likes
Like

Posted 10 August 2012 - 02:55 PM

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.

#16 SharkBaitHooHaHa   Members   -  Reputation: 271

Like
0Likes
Like

Posted 10 August 2012 - 06:37 PM

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.

#17 Matt-D   Crossbones+   -  Reputation: 1451

Like
2Likes
Like

Posted 10 August 2012 - 06:57 PM

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

Edited by Matt-D, 10 August 2012 - 07:00 PM.


#18 SimonForsman   Crossbones+   -  Reputation: 6067

Like
0Likes
Like

Posted 10 August 2012 - 06:59 PM

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

Edited by SimonForsman, 10 August 2012 - 07:18 PM.

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!

#19 Hodgman   Moderators   -  Reputation: 29759

Like
0Likes
Like

Posted 10 August 2012 - 07:01 PM

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

#20 Memories are Better   Prime Members   -  Reputation: 769

Like
1Likes
Like

Posted 10 August 2012 - 09:06 PM

In addition to Hodgman's list, there is also F# which is a functional language, that targets the .NET framework




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS