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
-
You can create classes if you want to, but objects feel more classy then classes
-
@legacyJanitor depends on your choice. If I don't wanna have any new frameworks/game changers to learn I would go with JSDoc
-
stisch46036yI think I've had my own C# flavored version of your lament. Arrays, hashes, maps.. why doesn't everything have a common *enumerable* I can use? I hate having to
Object.keys('foo').forEach(k => {
foo[k] = 'r u fukkin kidding m8';
}); -
Root797766yI love how ES6 classes aren't classes.
It's such a great language.
For all the blind, this is dripping with sarcasm. -
@irene I can't believe this is the language Windows 8 bet their whole immersive shell on. It's just, so ugh
-
@Root I wrote a class heavy Javascript framework pre-2015. Defining classes as functions never really sat well with me.
Fast forward to today, when I'm looking into Javascript again, and lo and behold they have classes! Or not. Turns out to be syntactic sugar and you have to work with all the weirdness of ugh ;_; -
@Pogromist "You have array, it's a stack, queue, hash table."
Are you *sure* it's a hash table? I don't want to be doing a "in/has" check and find out it's doing a O(n) iteration.
From what I can tell, the workflow is: change between array and maps each time you need the functionality of either. That's 2n extra OVERHEAD per calculation, potentially adding a n per iteration, aka taking an overall O(n) function and making it O(n^2)!!
That is so wtf-butt backwards to me.
How can Javascript, one of the MOST WIDELY used and MATURE languages with A MILLION CANCEROUS FRAMEWORKS, NOT have a basic collections class? Are data structures not important in Javascript?
I've been struggling all night trying to get Sets working - surprise, they're utterly useless in Javascript cause you can't define the set comparator.
I just lost it when I found out THERE ISN'T EVEN A QUEUE. WT-ACTUAL-F
rant
javascript