5 ms·
Probably an unpopular opinion but I don't think pre-optimization is a bad thing specially in use cases where you will need to optimize the application later, as
by ksubedi 10y ago
Probably an unpopular opinion but I don't think pre-optimization is a bad thing specially in use cases where you will need to optimize the application later, as refactoring things for optimization later is much more time consuming.
That being said, it all depends on the use case. And about your point on binary output, its not just about being able to get one binary and running it in different platforms, its also about being able to run it without much setup in the future. For example, I had a hard time getting a nodejs app that I built a few years ago running again since so many libraries were deprecated and I had a lot of broken packages, but if it was built using Go, it would just be one binary with all the dependencies packaged in and I would be able to run it without any issues.
- jwilliams 10y agoI think people have come to interpret the pre-optimization mantra in different ways, which leads to some confusion. Personally I think it's fine to have optimization goals, particularly around things like performance, cost and security (or even your ability to hire engineers). Maybe you park some of them while you prove another point, but you can (and should) measure and adapt along the way.
- z3t4 10y agothis is why i only use pure JS in nodejs. then it will always work for that version of nodejs. you cant asume that binary version of nodejs will work forever though.
- conceptme 10y agoDoes GO have a dependency manager yet? last time i checked it out it was only things like go get which did a git checkout? I doubt anything would keep working on active libraries without version locking composer / yarn seem to do this a lot better.
- ksubedi 10y agoI am not sure about the situation of dependency management on Go atm (havent used it for a few months), but in my case if I had a pre-compiled binary, I could just fire it up without having to worry about compiling from source. I was not a big fan of the way Go handled dependency a while ago, but I am sure there are better tools out there now.
- Zikes 10y agodep is being adopted as the officially "blessed" tool of choice.
- jgimenez 10y agoYes, not really an official solution yet, but they're getting there.
- fancy_pantser 10y agoIt will be in 1.10. Details and roadmap: https://github.com/golang/dep/wiki/Roadmap https://github.com/golang/dep/wiki/Roadmap