DEV Community

Discussion on: Avoid use IF on our JS scripts

Collapse
 
kalium profile image
kalium.xyz

You can do functional fine with a more verbose language (e.g. rust allows for assignment with the result of an if statement), this is just a design choice of the language.

Having a more verbose language is not inherently bad nor are if statements not part of a proper functional language.

Thread Thread
 
mateiadrielrafael profile image
Matei Adriel

Yep, most fp langs consider if statements simple expressions, so you can pass the results around