Jump to content
  • Advertisement
Sign in to follow this  
CuppoJava

Suggest a new language for me to learn?

This topic is 3643 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I come from a Java background and I'm frustrated that I'm spending too much development time refactoring and managing my class structure than writing useful code. I'm thinking about learning Haskell / OCaML / CommonLisp / Scheme / Ruby. Does anyone have direct experience with any of these as well as a C++/Java language, and can tell me about their experiences? I want a language that will minimize development time for me. Good, well-documented libraries would be a big plus. (GUI and OpenGL are a must). Here's the things that I love about Java: -Really really really good libraries. Well-documented. Vast. Standardized. -Good IDE. (IntelliJ IDEA) And this is what I want to avoid: -Maintaining a good class structure requires careful thought and planning. Much of my time (ie..even programming a simple button) is spent on creating small re-usuable modules that meshes well with my existing framework ... bla bla bla. Thanks a lot for your advice -Cuppo

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by CuppoJava

Much of my time (ie..even programming a simple button) is spent on creating small re-usuable modules that meshes well with my existing framework ... bla bla bla.

Thanks a lot for your advice
-Cuppo


you must be doing something wrong if you spend all your time writing small reusable modules instead of using small reusable modules.

I guess it depends are you tired of OO and looking to expand your abilities? If so go with Scheme or Haskell. If you like OO but want to see it in a new light Ruby or Smalltalk is the way to go.

Share this post


Link to post
Share on other sites
Most people will probably disagree with me, but I think Ruby might be a good choice for you.

Not only do you get a large user base and easy install system (look up the gem installation system), but you also get a gentle introduction to functional thinking while keeping yourself in safe procedural land. On TOP of that, you also have a universe where everything is an object, making for some very, very cool meta-programming capabilities.

For example, check this out:

class Array
def average
self.inject(0.0) { |s,e| s+e } / self.size
end

def squared
self.map { |e| e**2 }
end

def randomize
self.sort { rand }
end
end





In this example, I actually alter the built in Array object and add two new functions. The first finds the average of all the elements in the array, while the second returns an array of all the elements squared.

It isn't too fast yet, but the community is there. If you can get past the Ruby on Rails hype, there is some actual substance. After, you will find the transition to a language like Python extremely easy. Even moving to O'Caml, Haskell, or Scheme should be easier as you understand the basic concepts of functional style programming...

[Edited by - visage on July 21, 2008 3:27:37 PM]

Share this post


Link to post
Share on other sites
Yes, I am actually very very much interested in functional programming.

Which functional programming language is the most practical?
ie. Has the most complete libraries.
Runs fast enough to develop games on.

I was quite interested in Haskell.
Till I noticed that somethings are just not practical.
ie... dynamic programming algorithms in Haskell is really hard. But pretty necessary from a practical standpoint.

Share this post


Link to post
Share on other sites
Lisp I guess is probably the most widespread functional language. Read this free book as it uses Scheme which is a Lisp derivative, plus it is a rather well regarded comp sci text book :

http://mitpress.mit.edu/sicp/full-text/book/book.html

Share this post


Link to post
Share on other sites
Haskell, Ocaml, and clean are the fastest FP languages I know of though they tend to have less introductory information. I know Haskell has opengl bindings, I am pretty sure Ocaml does as well. I am pretty sure clean doesn't.

Scheme and Lisp are going to be a little slower. They will be much easier to learn because there is a wealth of info available on them. Several universities have used Scheme as their intro to CS language. Some of the free books on the web are considered to be the best intro programming books out there. such as http://mitpress.mit.edu/sicp/

Personally I would go scheme.

Share this post


Link to post
Share on other sites
Scheme if you want to learn only about the functional programming paradigm or Haskell if you don't mind learning about a real static typing system as well.

Scheme is easy and fast to learn, Haskell requires a lot more dedication, because static typing really raises the complexity bar.

If you don't know the functional paradigm, go with Scheme first to get yourself acquainted with the different ideas and then go for Haskell, which is a lot more modern.

Share this post


Link to post
Share on other sites
Quote:
Original post by CuppoJava
Yes, I am actually very very much interested in functional programming.

Which functional programming language is the most practical?
ie. Has the most complete libraries.
Runs fast enough to develop games on.

I was quite interested in Haskell.
Till I noticed that somethings are just not practical.
ie... dynamic programming algorithms in Haskell is really hard. But pretty necessary from a practical standpoint.

Then it sounds like you'd be more interested and better off going with F# or Python from what you have stated so far.


Share this post


Link to post
Share on other sites
I wanted to throw in that I also LOVE ruby, and think you'd like it. If not Ruby, go with Python... both offer good choices for OO, procedural, or functional programming.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!