Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
God it annoys me so much when people don't do that. Also not enough people know about partial function application
-
@brukernavn32 agreed. I have been teaching my co-workers more functional programming patterns.
-
kileak6238yThing is, most people switching from a OOP language (eg Java /C#) usually thinks structurally like the bad example.
What you might want to highlight is that a function is an object in javascript. In fact, everything is an object, that's how it works. -
True @kileak. In most modern languages functions are first class objects (python, js etc). IMO that's what makes it fun though.
-
kileak6238y@ecmawizard haha well yeah. But null and undefined being objects kinda blew my mind when I found out.
Related Rants
-
localpost32General advice: If you're the smartest person in the room, you're in the wrong room.
-
tahnik63So I need to create a nice new web app. Let's look at some cool JS frameworks that I can work with. *5 mins l...
-
ahmedam23What only relying on JavaScript for HTML form input validation looks like
Pass by reference, do not wrap needlessly
// Bad
takesCallback(function (data) {
// Literally all this function does
processData(data)
}
// Good
takesCallback(processData)
I see this all the time, especially with jr devs.
undefined
wk26
js