Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is a hard take, just because we all build on stacks. When we trust that Math.Abs() is going to work in some language, or that some socket library is going to do what it says on the tin, we're standing on the shoulders of giants. I also avoid frameworks as much as possible, but by frameworks I mean anything I'd rather roll myself in a scripting language, particularly when learning and keeping up with the framework seems like more of a hassle. But for the layers and layers of underlying software and hardware behind me writing REST calls and async functions?

Also, there are higher level libraries that are sometimes good, because why reinvent the wheel every time you make something? Pixijs is one I use a lot. Also, Chart.js. Jquery. Moment.js. Good ol' Bootstrap 4 alpha's CSS handles a ton of use cases, and I never need to think about it again. There's very little in those that I haven't at one time or another rolled myself, but having a toolkit that you know and doesn't change much saves you a lot of time. The danger is more getting into libraries that aren't already dead, and are still in active development ;)



Moment.js is one of those libraries to avoid; the bloat....


I still like Moment because it offers better control of time zones that aren’t the browsers time zone when compared to the builtin Date APIs.

Do you have a recommendation to replace Moment for that use case?

I’m hopeful for the future with JavaScript Temporal.


A maintainer of moment.js has moved on with an immutable rewrite called luxon.js. Highly recommended.

https://github.com/moment/luxon/blob/master/docs/why.md


dayjs is a similar library that I’ve used to replace Moment with minimal effort.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: