back to article At the very last Moment.js: Time-and-date JavaScript library fetched 12 million times a week ends development

The maintainers of Moment.js, a JavaScript time-and-date handling library downloaded 12 million times a week, put the project into maintenance mode on Tuesday, and advised developers to consider alternatives. "We recognize that many existing projects may continue to use Moment, but we would like to discourage Moment from being …

  1. Anonymous Coward
    Anonymous Coward

    One step forward, 1000 shuffles backward

    "In the meantime, Moment maintainers suggest Luxon, Day.js, date-fns, js-Joda, or built-in JavaScript objects as alternatives."

    And of course 'someone' has a well-written summary of each alternative, along with a full cross-comparison of features and sub-features, right?

    Instead of 1000s of developers rediscovering how hard it is to do time (pun intended) with "built-in JavaScript objects" perhaps 'someone' (like Google?) can save us all those developer hours of pain?

    That one's bad, but your guess is as good as mine on 'good', is a shitty way to make progress improving the web.

    1. wangi

      Re: One step forward, 1000 shuffles backward

      It would just take a moment

    2. Anonymous Coward
      Anonymous Coward

      Re: One step forward, 1000 shuffles backward

      > Instead of 1000s of developers rediscovering how hard it is to do time (pun intended) with "built-in JavaScript objects" perhaps 'someone' (like Google?) can save us all those developer hours of pain?

      How I read this:

      "Instead of independent developers experimenting with different solutions, we should let a giant corporate monolith decide on one solution to be forced on everyone!"

      If we're going to have a single solution for everyone, that probably really should be solved with new JavaScript time-API specifications. That way we can have multiple giant corporate monoliths colluding to decide on one solution to be forced on everyone!

  2. bombastic bob Silver badge
    Facepalm

    advised developers to consider alternatives.

    like, copy/pasta into your OWN version?

    this live-update-from-online-repo thing is HIGHLY overrated... and has created a FEW problems in the past... just a few. OK MORE than a few. Old news, yeah. But a "teachable" moment nonetheless. (too bad devs didn't learn)

    If you ask me, it's a maintainers NIGHTMARE to have such a moving target, especially if you like RELIABILITY and MAINTAINABILITY.

    a) Dev says "I'm quitting"

    b) you're screwed - or else

    c) clone your own copy, to hell with 3rd party nonsense

    icon, because, facepalm.

    /me pictures a meme where someone hits his face into a palm tree. "Face Palm" - you're doing it wrong

    and this live-code-update concept - YOU'RE DOING IT WRONG

    1. Julz Silver badge

      Re: advised developers to consider alternatives.

      I find myself strangely in the position of agreeing with your forceful sentiment, as in general, dynamically downloading libraries of unknowable code to perform god knows what, doesn't seem to be a wise thing to do. However, a date/time package is not something that everyone should be rolling themselves. That way leads to a chaos of errant behaviors and unpredictable effects. So,how do you square this particular triangle?

      Perhaps we should grow up as a profession and use maintained, accredited, stable, vetted libraries of code for these sorts of basic functions. Even paying for them (oh the horror). Kind of like growing up and being proper engineers.

      The wild west days of the computer industry has been good to me over the years. It does however seem that the time to move on is overdue.

    2. Captain Obvious
      Joke

      Re: advised developers to consider alternatives.

      like, copy/pasta into your OWN version?

      Would that be the flying spaghetti monster version?

  3. m4r35n357

    Typical JS

    Finished code considered harmful.

    1. Julz Silver badge

      Re: Typical JS

      The inevitable result of a piss poor coding model. In order to facilitate the avoidance of the coding crisis of the eighties, when it was recognised that the model of the time couldn't produce the amount of code predicted to be required, all sorts of solutions were sort. These included forth generation languages (remember them), programming workbenches (kind of morphed into IDE's) and many others. But the winners were dynamic programming languages and voluminous user generated libraries. Oh well...

      Edit; I missed off blindly copy and pasting code from the web. There are bound to be others I've missed but the general drift is there.

  4. David Roberts

    Windows model?

    No new features because it would break backwards compatibility?

    Wonder where the coders work.......?

    .

    .

    .

    .

    Not really fair on the coders because they are stuck with the coding strategy. Still, interesting coincidence.

  5. wolfetone

    Lighthouse

    I wouldn't put much stock in to what Lighthouse says. Comes back with randomly different results, and flags Google's own JS products as things that should be replaced or removed.

    Absolutely great if you use Google AdSense on your website. Or Google Analytics.

  6. maffski

    I suspect Goodhart's law applies here

    'When a measure becomes a target, it ceases to be a good measure'

    Once library size becomes the target I can see lots of libraries becoming nothing but a plugin framework, replacing an 80kb library with a 10kb library and 100kb of extensions.

    1. John Brown (no body) Silver badge

      Re: I suspect Goodhart's law applies here

      "Once library size becomes the target I can see lots of libraries becoming nothing but a plugin framework, replacing an 80kb library with a 10kb library and 100kb of extensions."

      If I'm understanding the article correctly, that's what this "shake the tree" thing is about. Modern JS libraries should be able to be pared down on the fly as required so your web page/app only downloads the code it needs, not the entire library.

  7. d36williams

    Google has turned the Console in to Advertising Space

    With this change, Google "recommending" libraries; how long until those recomendations are paid or simply pimp out Google products? Chrome is taking an IE6 like position on the web.

  8. Efer Brick

    Well, if you do get your software

    From a charidee shop

  9. usariocalve

    It's crazy that people are complaining about mutability. Who gave the mutability police authority to declare that all libraries must follow the mantra of immutability?

    I mean, the Javascript runtime is already a memory pig. Lets make it use more memory by requiring programmers to create new copies of objects when changing an instance variable/property? Who thought up that dumb requirement?

    I can only assume that programmers have gotten more stupid as time goes on. First they complain about C being dangerous, now they complain that "oh no, objects can be changed." What's next, functional programming?

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Biting the hand that feeds IT © 1998–2020