4 ms·
> But it’s not. Because if you’re not adding new features and pushing code changes every day, your project is abandoned, dead. To quote another thread from two
by judofyr 6y ago
> But it’s not. Because if you’re not adding new features and pushing code changes every day, your project is abandoned, dead. To quote another thread from two minutes ago: “I’m quite sad to see the end of Moment.js”
In this case, the reason why Moment.js is "dead" and not "done" is because it has fundamental flaws in its design: Mutable objects + huge bundle size which doesn't work well with tree-shaking.
- wvenable 6y agoIf you fundamentally and incompatibly change it's design then it's an entirely new product. Calling that "Moment Version 3" doesn't mean anything.
- wruza 6y agoHa-ha, oh dear. From your lips to gulp's (and other "bump major at tuesday" projects) ears.
- manquer 6y agoBrand value is huge. I would trust moment 3 lot more than project I never heard of . I would trust a new projects by core authors of moment almost as much too.[1] Trust is major factor when depending on third party libraries especially in the JS ecosystem. [1] reason libre office or deno gains traction
- throwaway189262 6y agoHuge bundle sizes and mutability are JS design flaws. Until very recently it was impossible to make objects immutable in JS. Even now its really only done using third party libraries. Huge bundle size is only a problem because tree shaking is done on a "module" level. Most languages are static enough that it's called dead code elimination and doesn't need to use tree pruning. You can tell statically that the code is not used. Moment isn't compatible with modern workarounds which I don't blame it for. The way JS is, immutability and true dead code elimination will probably show up as built in features in a few years and make all this obsolete again
- kqr 6y ago> Until very recently it was impossible to make objects immutable in JS. Even now its really only done using third party libraries. There's a big difference between "literally impossible to mutate" (only important in the most security-critical contexts) and "designed around immutability as the default" (which is what is desired in most of the real world.) The former not being possible is not a reason to exclude the latter.
- throwaway189262 6y agoWith JS, until recently, it was nearly impossible to design immutable API's. Everything takes JSON based objects which have no field accessors. All the objects underneath are just hashmaps with string keys. When all your objects are hashmaps you can't really make fields immutable. Even if you wrote getters, someone can just reassign the function reference. Even if you check your fields in incoming object parameters, somebody can randomly add more fields that you don't know about. Until recently you couldn't stop people from randomly adding fields to your objects Nowadays JS supports stuff like freeze thaw which makes it easier
- Ndymium 6y agoObject.freeze() has been available since IE 9, Firefox 4, Chrome 6 etc. Not really "recently" in web terms.
- jimmaswell 6y agoYou can mess with private fields with reflection in other languages too. If someone's bent on bypassing your API you're not going to stop them.
- winstonewert 6y agoYou didn't have language enforced immutability. But you still could have convention enforced immutability. If you don't provide apis that mutate your objects and document that mutating is not supported, you get almost all of the benefits of immutability.
- 6y ago
- alexbanks 6y agoJust because you disagree with a design decision doesn't change the done/dead debate. It's done, because its maintainers have agreed the project has gone as far as it needs to go, and its current iteration is stable. You (as always) can choose not to use a project you do not agree with; that has no bearing on the project's status.
- judofyr 6y agoThis isn’t me disagreeing with the design decision, this was their own explanation for why you shouldn’t use Moment.js in the future. My point was that the reason we’re transitioning away from it is because of technical reason, not because it’s not being updated.
- kristopolous 6y agoI'd been complaining about these issues for years. I kinda hate being vindicated years later, the time in between as an outsider kinda frustrates me. I wish we had a more thoughtful, less packrat culture in programming. Fighting off the pushback is exhausting. It's not even worth bringing things up most of the time. And as a disclaimer to those feeling tempted, I've got zero interest in debating this reality, water is wet.
- eevilspock 6y agoIt's the same in all human culture and politics. Every era's mainstream ridicules and dismisses those who criticize it as "extremists". But some of those extremists will one day be vindicated as being on the right side of history long before everyone else came around, and we will look back at that prior mainstream attitude and ask, "How could they be so blind?" The important thing to keep in mind that we don't know which of today's counter-culture takes will end up winning (I don't say "being right" because cultural evolution is, like biological evolution, not teleological). In other words, you had a belief, and in hindsight you were "vindicated". But there were many others who had equally strong beliefs that were not.
- ufmace 6y ago