DEV Community

Discussion on: Elm: the jerk that took away my for-loops.

Collapse
 
1hko profile image
1hko • Edited

I disagree with this. JS is a multi-paradigm language where multiple disciplines can be used. JavaScript includes first-class functions, destructuring assignment, and other features which enable great support for functional style. You can avoid many object-oriented or imperative-style features of the language and skip all the headaches that come with them.

Collapse
 
drbearhands profile image
DrBearhands

I never said anything about functional style so I'm not sure what you're trying to disagree with here...

Thread Thread
 
1hko profile image
1hko

JS is a language of actions. It does things: "allocating" a variable and changing its value are the building blocks of a for loop.

I politely disagree with your summary of what JS is, that's all.

Thread Thread
 
ryan-haskell profile image
Ryan Haskell

Oh sorry, that wasn't my quote 😅

Thought this was a direct reply to my article haha

Thread Thread
 
drbearhands profile image
DrBearhands

"Functional style", ill-defined as it is, does not equate to not having effects / actions.

Collapse
 
ryan-haskell profile image
Ryan Haskell

I totally agree with you!

The point of the post was not to say "JavaScript doesn't support functional programming"

It was just about my experience with a language that only supported functional things.

When I first got started with JS, I naturally used for loops because of my background with Java and imperative languages.

Elm forced me to try something different, and now that's the style I prefer using in JS too 😃

Thanks for your reply, sorry about causing the confusion!