I'm starting a new project and don't know which language to use.
My 'must have' requirements are:
My 'nice to have' requirements are:
I'm thinking about Haskell now, but keeping in mind OCaml as well.
Update: This application is intended to be a simple language parsing and manipulation utility.
Please advice, if my choice is correct.
Yes, Haskell is worth learning in 2022 because functional languages like it are getting more popular among big companies like Facebook. Functional languages are typically ideal for big data and machine learning.
Today, Haskell is widely used in the software industry. Although it's not as popular as Python/Java/C++, Haskell has many benefits compared to them: Concise, high-level, practical and also very fast. An advanced system, which provides a lot of extra safety and flexibility.
It's not as good and polished as rust's cargo but it's ahead several other languages. Still, as a language, Haskell is not ideal for teaching and productivity. There too many different ways of doing things (eg. strings, records); compiler errors need improvement, prelude has too many exceptions-throwing functions (eg.
Haskell is a purely functional programming language. It is general-purpose and statically typed. Programs in Haskell are always written as mathematical functions which have no side effects. It is mainly used in research and academia.
Haskell:
1: It runs on Linux, Windows and OS X, in many cases without changes to source code.
2: Native binaries generated. No VM.
3: Full Unicode support. All UTF variants supported.
4: Full threading support, plus if you only want parallelisation then you can use "par" with a 100% guarantee that it only affects the time taken rather than the semantics.
5: As fast as C, although some tweaking can be required, the skills required are currently rather obscure, and apparently minor tweaks can have multiple orders of magnitude impact.
6: Standard library included, and "Hackage" has lots more packages including a range of parser libraries.
7: Friendly community on IRC (#haskell) and here.
Edit: On the "nice to have" points:
1: Haskell is an uncompromisingly pure functional language.
2: It has generally good string manipulation, with regexes if you want them. As someone said in a later comment, beware the efficiency of the built-in "String" type (it represents a string as a linked list of characters), but the ByteString and Text libraries will solve that for you.
3: Is it hard to learn? Its nowhere near as complicated as C++, and probably a lot simpler than Java or even maybe Python. But its pure functional nature means that it is very different to imperative languages. The problem is not so much learning Haskell as unlearning imperative thought patterns.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With