Advertising (This ad goes away for registered users. You can Login or Register)

Im looking for a functionnal language, but so many choice...

Programming on your favorite platform, for your favorite platform? Post here
Locked
asgard20032
Posts: 186
Joined: Thu Jan 20, 2011 1:16 pm
Location: Milky Way, Solar system, Earth, North America, Canada, Québec..... In front of my computer

Im looking for a functionnal language, but so many choice...

Post by asgard20032 »

After having learning C, im now looking to learn a new paradigms, I like how object oriented work(didn't used it, but I have read some tutorial about the OO part), but still I don't want to go with object oriented right now. I still want to wait maybe 6 month - 1 year before starting C++.

For now, I want to try something new, so since I love math, I think a functional language could be a good addition to my knowledge. But I can't decide on which language I should choose for a functional language, so many choice:

Common Lisp (A lisp dialect)
Scheme (another lisp dialect)
Haskell
Erlang
OCaml
F#
Scala
D language

What would you recommend to learn functional programming. Don't want answer like "I know Erlang and its good" But more something like "This one is very popular, larger community, more library available, easy to setup environment...)

Also, I want to know: (Answer to these question may influence a little my decision)
- which one is interpreted
- which one can be compiled
- a good tutorial for the one you will suggest me
- which one is the more popular
- the one with more library available
- the one with binding to popular library available in C and C++ (Its good to have lot of library, but I prefer having less library available, but having more library that I can use in other language)
- Which one is faster for the same algorithm
- Which one is better to get a job (I don't say I will try to get a job with it, but im asking which one is better on a CV, we never know if one day I won't use it at work)
- Which one is better for big number (I would like to do something maybe like PI for fun)
- Does a functional language can achieve better result than C + big number library in term of speed and memory for big calculus like PI, e, Fibonacci...
- which one has the easier syntax(I mean, the one we need to use less symbol like |, <, >, `, ~, ^, \, /... that tend to change position depending keyboard layout. In my region, we use USA English keyboard, Canadian English keyboard, Canadian French keyboard... Even myself I still have difficulty to switch between the tree layout.) (There is a very little chance that it influence my choice, after all, I have a razer keyboard, I can remap control)
- Which one of those language is the most representative of functional(I know that sometime, a programming language can differ a little from the other in the same paradigms, having almost the same feature, but having a different programming style) (This won't really influence my choice, but by curiosity)
- Is there a way to use function written in C in any of those language? A way to call function in those language from C? (Like a way to create a library, if its compiled) It could be interesting to do a program in C, which use for its math portion a functional language
- Which one has better support for 64 bit
- Which one is more used in school for teaching purpose (This won't really influence my choice, but by curiosity)
- Is there any functional language with loop? (I know we are not suppose to use loop, but recursion. But we never know when loop can save us from something we have difficulty, then when it work, try to remake it recursive)
- Which language used some curly brace for its logo... { }, if I remember well, there was a language, maybe not functional, that used, if i remember correctly, curly brace for its logo. Im just wondering now which language is was. (Maybe it was not curly brace, but other parentheses, or even some //, don't remember well...) Maybe it don't even exist and it was just in a dream I saw that... If someone could find me a page with the logo of many programming language.

Except functional, imperative and Object oriented, what other major paradigms should I check out one day?
Advertising
Image
ohrores
Posts: 21
Joined: Thu Apr 14, 2011 5:11 pm
Location: Germany

Re: Im looking for a functionnal language, but so many choic

Post by ohrores »

I will describe Haskell for you a bit, because I only know Haskell from your list.

First off I like to quote the description of Haskell from HaskellWiki:
HaskellWiki wrote:Haskell is an advanced purely-functional programming language. An open-source product of more than twenty years of cutting-edge research, it allows rapid development of robust, concise, correct software. With strong support for integration with other languages, built-in concurrency and parallelism, debuggers, profilers, rich libraries and an active community, Haskell makes it easier to produce flexible, maintainable, high-quality software.
There are different haskell compiler you can use, but GHC is probably the best choice.
GHCI is an interactive interpreter, which is very good for learning and debugging and runhaskell is a normal interpreter.

For starting with Haskell a recommend Learn You a Haskell for Great Good a book
you can buy or read online for free. It is aimed at people coming from imperative languages. Also in the introduction is an overview of the book and haskell.
For advanced haskell I suggest realworldhaskell.

In my opinion the community of haskell is very great.
Look at this graph m0skit0 posted recently.
Also there are 9,286 subscribers at the moment on reddit haskell.

For more information about Haskell look at the Haskell Wiki and for news look at reddit or planet.haskell.
Here you can find an article about why you should use haskell.
Advertising
[spoiler]Image[/spoiler]
m0skit0
Guru
Posts: 3817
Joined: Mon Sep 27, 2010 6:01 pm

Re: Im looking for a functionnal language, but so many choic

Post by m0skit0 »

I like LISP very much since it's one of the oldest functional languages still in use. I had a look at Clojure, which seems quite nice since it can directly run on a JVM and thus doesn't need its own development environment. Clojure is a LISP dialect, too.
asgard20032 wrote:- which one is interpreted
- which one can be compiled
Knowing this really has no use. Modern fashion is to have the language interpreted. Interpreted languages can be compiled as well, since that's what the interpreter does anyway.
asgard20032 wrote:- the one with more library available
Common LISP probably is the one with more libraries available basically due to its "oldness".
asgard20032 wrote:- the one with binding to popular library available in C and C++ (Its good to have lot of library, but I prefer having less library available, but having more library that I can use in other language)
I'm pretty sure most (if not all) of those languages provide an interfacing with native libraries (C/C++).
asgard20032 wrote:- Which one is faster for the same algorithm
Which algorithm? I'm pretty sure that each of these languages will perform differently depending on the problem. Languages are tools, and as such, they were created for a specific set of problems in mind, and will perform better on those problems. And anyway: speed is not always the important part. Stop focusing on that.
asgard20032 wrote:- Which one is better to get a job
This changes so fast I can't answer. Functional languages are not that popular (erroneously) with "suits" (bosses). You can look at jobs offers in your country to get an idea.
asgard20032 wrote:- Which one is better for big number
All of them should handle big numbers with no problems.
asgard20032 wrote:- Does a functional language can achieve better result than C + big number library in term of speed and memory for big calculus like PI, e, Fibonacci..
Almost no language can beat C on speed. C has pretty optimized compilers.
asgard20032 wrote:- which one has the easier syntax
LISP dialects use almost no symbols except a LOT of parenthesis.
asgard20032 wrote:- Is there a way to use function written in C in any of those language? A way to call function in those language from C?
You already asked this (the one with binding to popular library available in C and C++).
asgard20032 wrote:- Which one is more used in school for teaching purpose
I was taught functional programming basics and artificial intelligence algorithms with LISP. Pretty much easy to understand if you get grasp of functional programming ideas.
asgard20032 wrote:- Is there any functional language with loop?
If you want loops, use another paradigm. Using loops (if they were available) would be a "bad" functional design. IIRC LISP did not have any loop construct (but some dialects like AutoLISP do).
asgard20032 wrote:Except functional, imperative and Object oriented, what other major paradigms should I check out one day?
If you know those 3 (and I mean really "know"), you actually would need no more to be a programming guru. You can maybe check logic programming.
I wanna lots of mov al,0xb
Image
"just not into this RA stuffz"
wololo
Site Admin
Posts: 3621
Joined: Wed Oct 15, 2008 12:42 am
Location: Japan

Re: Im looking for a functionnal language, but so many choic

Post by wololo »

m0skit0 wrote:
asgard20032 wrote:- Which one is better to get a job
This changes so fast I can't answer. Functional languages are not that popular (erroneously) with "suits" (bosses). You can look at jobs offers in your country to get an idea.
It's not always "suits" doing the interviews for candidates though. Actually, I'd rather avoid a company where the people interviewing a programmer are not (at least some of them) programmers themselves.

In my company, Haskell, Lisp, and Scala are pretty popular among engineers, and genuine interest in at least one functional language (any of them really) gives you bonus points as a candidate in interviews.
Lisp is useful for its integration with emacs, which is still a popular editor for many programmers
Scala is popular due to its integration with Java (which is one of the most popular languages in the programming industry, for better of for worse).
Haskell not sure there's a reason, but it's popular

So, as far as "getting a job" is concerned, I'd really recommend Scala, or Lisp. Not that you will work everyday with these languages (C++ and Java are much more wanted I think), but they will help.
If you need US PSN Codes, this technique is what I recommend.

Looking for guest bloggers and news hunters here at wololo.net, PM me!
m0skit0
Guru
Posts: 3817
Joined: Mon Sep 27, 2010 6:01 pm

Re: Im looking for a functionnal language, but so many choic

Post by m0skit0 »

wololo wrote:Actually, I'd rather avoid a company where the people interviewing a programmer are not (at least some of them) programmers themselves.
Then you would not work ever in Spain :lol: Here most people doing the interviews are "human resources" (whatever this means) staff. Absolutely useless people, tbh.
I wanna lots of mov al,0xb
Image
"just not into this RA stuffz"
asgard20032
Posts: 186
Joined: Thu Jan 20, 2011 1:16 pm
Location: Milky Way, Solar system, Earth, North America, Canada, Québec..... In front of my computer

Re: Im looking for a functionnal language, but so many choic

Post by asgard20032 »

Now, I hesitate mostly between haskell and Common Lisp...
Image
ohrores
Posts: 21
Joined: Thu Apr 14, 2011 5:11 pm
Location: Germany

Re: Im looking for a functionnal language, but so many choic

Post by ohrores »

Here is a site about haskell in industry.
Also if you really want to break your mindset you should go with haskell, because common lisp has imperative aspects
and haskell is purely functional.
[spoiler]Image[/spoiler]
Locked

Return to “Programming”