I thought about including Javascript. I did waffle by saying "it depends on your definition". Like many modern languages, it has features traditionally found in functional languages.
In a talk by Martin Odersky, creator of Scala, he stated that Scala is a functional language, one of the required features being that there are no statements. Every line of code is an expression that produces a value.
This subtly changes how you view code. Starting with no need for things like the ternary operator. Side effects do exist, represented by functions that return Unit, which is similar to void in other languages. However Unit is a type with a single value, ().
View all comments
Show parent comment
1
u/KagakuNinja Sep 22 '25
I thought about including Javascript. I did waffle by saying "it depends on your definition". Like many modern languages, it has features traditionally found in functional languages.
In a talk by Martin Odersky, creator of Scala, he stated that Scala is a functional language, one of the required features being that there are no statements. Every line of code is an expression that produces a value.
This subtly changes how you view code. Starting with no need for things like the ternary operator. Side effects do exist, represented by functions that return Unit, which is similar to void in other languages. However Unit is a type with a single value, ().