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?

  • 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. – Lukasz Madon Apr 26 '11 at 13:32
  • 1
    The mention of lua and go here is bizarre. – Jim Balter Sep 14 '17 at 9:34

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.

  • 1
    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. – Lukasz Madon 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
  • 3
    @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

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.


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


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!


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.

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