So You Want to be a Functional Programmer (Part 6)
Charles Scalfani
87125
JavaScript was built in 10 days. The way to do this was making a programming language flexible to its core. The result was a very expressive and extensible language. And I learned a few things from it:
- JavaScript is not opinionated about how we should code our software. Want to write imperative code, OOP, functional or a mix, it’s our choice. For example, functional programming is great for processing data, but not so much for IO where Objects are better.
- Constraints can be nice until a new use case does not fit in and you end up hacking the language. Strong types are a great example where developers at some point would need to use the type ANY, giving up to type checking. And that is completely fine. We should be able to choose where to use types and where not to use them.
- The main difference between other programming languages and JavaScript is that with other languages you choose your constrains from the moment you write your first line of code and you can’t escape them until the last line of code, while with JavaScript you are free to enable or release constraints during your project lifetime.
To conclude, I prefer to choose what features to use of a language. Not being told how to code by the language.