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?
EDIT:
second choice would be Lua or Go.
Any pros and cons?
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? EDIT: second choice would be Lua or Go. Any pros and cons? |
|||||
|
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. |
|||||||||||||||
|
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. |
|||
|
I would say JavaScript
|
||||
|
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! |
|||
|