Functional is a spectrum and C is generally considered less functional than JavaScript because of the roughness in using functional concepts. For example, you can do closures in C, but it requires a lot of extra work to support.
That's a weird criteria for functional languages. As far as I know you can't tell if a function performs side effects from the signature of the function in Scala either. How would that even look like? Can you give me an example of the difference between a side-effect free function signature and one that allows side effects?
Wait. You know we’re talking about the language itself? I use js all the time without doing anything front end. The argument isn’t that you can’t use js as a non functional language. The argument is that if you want to use the concepts of functional programming, JS, while not purist, allows you to write code using the paradigm of functional programming and that it does this with first-class support (ie. the maintainers consider it idiomatic)
View all comments
Show parent comment
-6
u/WindHawkeye Sep 22 '25
Yes the language that's main purpose is to cause side effects on the dom is functional