Hacker News new | ask | show | jobs
by simplicitea 3231 days ago
> And how do you get the "next 3 elements after the 2nd" ?

.splice(2, 3) (am I missing something?)

> > The rest can be implemented in user-land: var md5 = require("md5") And then you get the current 3Mo pages we all hate. Are you even serious with your arguments or is it trolling ?

md5 node lib is 32kb unbundled. If you meant 3Mb pages that's ridiculous. Modular necessity at the hands of the user is good, and it's something that's been present in every project i've worked on in a less granular fashion than modern npm-driven apps can deliver.

1 comments

OP was talking about trading [] for {}. You can't splice on {}.
well, objects are not iterables... ??? unless you decide you want them to be, in which case you can make them such and design them in a way that they work as such?

The least elegant way is Object.keys().map(key => etc) which is really not that hard to work with

edit: it's a phony premise to begin with actually. Iterables have order, objects have mapping. I am less experienced with other languages so I probably don't understand OP's statement clearly. I just think OP's context is lazy thought rot about what's becoming a fairly elegant language. BUT I'm a noob.