Live data from Hacker News

We now consider Moment.js to be a legacy project in maintenance mode

momentjs.com

61–70 of 266 posts

Re: We now consider Moment.js to be a legacy project in maintenance mode

#61

It is not easy to replace moment.js since many libraries like react-dates rely on momentjs. Hope they have plan to replace it.

These kind of dependencies is one of the reasons I prefer to avoid react-* libraries.

It would be nice to see more flexible dependencies in such libs for example like material-ui pickers [0] which let’s you bring your own date/time lib.

[0] https://material-ui-pickers.dev/getting-started/installation

Re: We now consider Moment.js to be a legacy project in maintenance mode

#62
post #30

Earlier quoted context omitted.

I don't think mutability is JS design flaw. It was designed for manipulating UI - computer screen, which is mutable. If it was designed for printing (an immutable interface) i'd agree with you. Bigger problem is that people started using javascript for server side, for which is (was) totally unfit for.

JS just has a very simple, flawed design. It's still a rather bad language from a design perspective. One of the shortcuts is that all objects are hashmaps. Fully mutable hashmaps with string keys. You can do this: obj.prop = "hi"; obj["prop"] = "bye"; And you set the same field. And you can do that to any object, reassigning any field type. Most languages have static number of fields in an object, or at least static…

These are more like footguns for beginners than intractable obstacles. For example, you can avoid the issues in your comment with static analysis (Typescript). And the Javascript professional just avoids things like arbitrary obj[prop] and prototype chain hacking.

And since they aren't intractable, and smart people regularly decide that it's worth the downsides, you're making the uninteresting observation that $lang has warts.

Re: We now consider Moment.js to be a legacy project in maintenance mode

#63

I wish more software/libraries would mark themselves as "Done" instead of sending one update every week and a ui refresh every 6 months. Software engineering is the only field where we keep building a single thing forever until it becomes a hot mess.

It really isn't "done" if you tell people they probably should look at alternatives instead. Sounds more like a soft deprecation to me.

But regardless of semantics, they're being transparent on the project's status.

Re: We now consider Moment.js to be a legacy project in maintenance mode

#64
post #60
post #7

This should be a reason to use moment.js more, not less. It’s done, so it will not change under you, and you won’t have to rewrite your app.

Could you not just say the same about using LTS versions?

LTS in js-world is usually something like "we support it for about three months, maybe six".

And if within that period they release an incompatible version, your upgrade path is worse, beacause your version is too old.

Re: We now consider Moment.js to be a legacy project in maintenance mode

#65

TIL: Intl.DateTimeFormat [1] has good browser support [2] and allows for nifty tricks like > new Intl.DateTimeFormat('zh', { hour: 'numeric' }).format(new Date) [1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe... "MDN: Intl.DateTimeFormat" [2]: https://caniuse.com/mdn-javascript_builtins_intl_datetimefor... "Can I Use: Intl.DateTimeFormat"

The whole Intl namespace is a godsend.

Re: We now consider Moment.js to be a legacy project in maintenance mode

#66
post #19

I am very emotionally confused, as I feel this is a huge step forward for open source. More code should be done. More developers just need to know how to quit the project when the time is right. This is weird to say, but this is strong leadership.

This is exactly that: Strong, humble, responsible, positive and encouraging leadership and guidance.

Re: We now consider Moment.js to be a legacy project in maintenance mode

#67

Good for them. Open Source seems to have an irrational fear of done . Done is good. Done should be the goal. 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” I wish the was a way to fix this attitude. So that project maintainers didn’t need to write tw…

> I wish the was a way to fix this attitude. So that project maintainers didn’t need to write two page apologies for finishing their thing.

One of the problems is that GitHub is full of OSS libraries where the last commit was three years or more ago and you have no idea (without forensically analysing commits, issues, etc.) whether it's because the project is done or because the maintainer(s) lost interest, had other priorities, etc.

And you have no idea because they haven't said. They haven't told anyone: it's just drifted into an unclear state of unmaintained-ness.

I would suggest rather that what the Moment.js team have done here should be the norm: i.e., clear communication of the situation. That situation, as here, might be "done", or it might be "the thing's only half finished but we don't care enough to carry on any more", or something completely different. These are all good reasons to stop working on something even if they're potentially frustrating for users. E.g., in the "don't care" scenario, people have the option to step in and pick up maintenance, fork the project, or simply not use it.

Doesn't matter: understanding the state of a potential dependency in terms of maintenance and development is the key factor that will enable people to make an informed decision about whether to use it or not.

Re: We now consider Moment.js to be a legacy project in maintenance mode

#68
post #47

Good for them. Open Source seems to have an irrational fear of done . Done is good. Done should be the goal. 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” I wish the was a way to fix this attitude. So that project maintainers didn’t need to write tw…

I was about to write the same thing. I like "done". The best libraries are the ones in maintenance mode, with long-term stability goals. The worst libraries are ones where the author(s) do a Major Rewrite every year or two. There is a widespread meme/trope about something being "dead". Whenever I hear someone saying that a language/library is "dead", I make a point of checking that person's credentials. It almost alw…

That would be fine if they didn't recommend not to use it for new projects.

Re: We now consider Moment.js to be a legacy project in maintenance mode

#69
post #14

Earlier quoted context omitted.

> 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.

If you fundamentally and incompatibly change it's design then it's an entirely new product. Calling that "Moment Version 3" doesn't mean anything.

Ha-ha, oh dear. From your lips to gulp's (and other "bump major at tuesday" projects) ears.

Re: We now consider Moment.js to be a legacy project in maintenance mode

#70
post #2

> We now generally consider Moment to be a legacy project in maintenance mode. It is not dead, but it is indeed done.

Makes sense. Similar thing with 'request' awhile back.

I mean, you can see that even in the high-tech realm, it takes years for obsolescence to be acknowledged. But at least it does eventually happen.

I actually think that a lot of the problems that our society has in general is because we take too many decades to move on from obsolete ways of doing things.

What we need is for other core assumptions or technologies in our society to be able to upgraded. For examples: roads, cars, cities, government, money. I truly believe that all of those fundamental structures are often stuck in outdated forms that are holding us back.

Post reply on HN