Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I've been looking for functional language with C-like syntax and static typing. So far my choice would be Nemerle. Is there anything else/better?


second choice would be Lua or Go.

Any pros and cons?

share|improve this question
I think you should specify which features you are interested in, behind static typing. –  CheatEx Apr 26 '11 at 13:21
I will not be using it in a project (at least for now). I want to learn functional programming with the language as a platform. It has to be mature enough, running on windows. Would be great to have interactive mode. Also, not very complicated. –  lukas Apr 26 '11 at 13:32
add comment

5 Answers

up vote 8 down vote accepted

In general functional languages do not have C like syntax, It comes down to the fact that functional languages do things differently than C type languages so the syntax tends to be very different (and often shorter). At least for me adopting to the new syntax has not been a big deal when picking up languages. Right now I'm spending most of my time on Erlang but also took a look at Haskell and have done scheme in the past.

share|improve this answer
I do think for some the syntax is wildly different and that can be scary. Although, after a day or two looking at Lisp I can say that I absolutely love the syntax. Sometimes it is better to just break out of ones comfort zone! –  Jetti Apr 26 '11 at 12:59
yep but Lisp has very weak type system. –  lukas Apr 26 '11 at 13:12
True, but take say Haskell, which has a crazy strong type system, its got its own ideas on on syntax but it kind of grows on you. –  Zachary K Apr 26 '11 at 13:29
@lukas - Like Zachary said, I'm more stating the fact that the syntax will grow on you after awhile, but only if you give it a chance. –  Jetti Apr 26 '11 at 13:44
@lukas: Common Lisp has a strong type system. All objects are typed, and the type is determinable in detail at any time. You may be thinking that it has a dynamic, not static, type system. –  David Thornley Apr 26 '11 at 13:46
show 5 more comments

For you purposes (from the second comment) you should pick a language as little similar to C as possible, IMHO. Prolog and Scheme are best match to you requirements (except C-style syntax, of cause).

Anyway, you should keep in mind that all languages in your list are general-purpose and industry-oriented. They are not intended to be used for learning.

share|improve this answer
add comment

I would say JavaScript

  • It is a functional language
  • It uses C syntax
  • It can be used on a variety of operating systems (in both client and server mode), can be embedded in a lot of platforms (.NET, Java, Qt )

    This can be useful.

share|improve this answer
add comment

Scala has a distinctly C like syntax, albeit with an Object-oriented layer on top which comes via Java. The language is a nice blend of functional programming in the Standard ML family with an object-oriented language whose type system is tightly built into the ML-style static type inferencer of the language.

This means that you can type inference and pattern match over objects of user-defined classes in configurable ways, while keeping the strong-typedness which the ML-family languages are known for.

That said, I'd agree with the other posters -- consider stretching yourself a little more; learn a lisp, which is to say a language which is almost without syntax, and you'll never be hung up on `which' syntax your next language has again. :-)

share|improve this answer
add comment

Single Assignment C is the first that comes to mind.

However, I agree with the others. The syntax of functional languages can often be the interesting part! For instance, you can embed BASIC syntax inside Haskell's!

share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.