4 ms·
This is great! What is not so great is that Google's closure team (not be confused with clojure) decided to remove various functions, making breaking changes -
by beders 6y ago
This is great!
What is not so great is that Google's closure team (not be confused with clojure) decided to remove various functions, making breaking changes - for no obvious reasons other than saving a few lines of code.
Example Things like `goog.isArray` is gone, a library that was adopted by many (including the CLJS compiler) to help smooth out the differences in JS versions and supported features.
The closure team even has great advice for you:
"goog.isArray has been deleted. Use Array.isArray instead."
Well, how about you just delegate to that, Google team, and I can just upgrade?
This kind of library maintenance is what keeps me away from JS/TS where prior investments seem to be less valuable:
React deprecating lifecycle methods, Typescript's breaking changes page is pretty long (but admittedly, being MSFT, they try to care about backward compatibility), Vue.js 3: functional components deprecated, manual changes required.
Who can afford these shenanigans?
Changes in re-frame, reagent etc. have been a lot more careful. Not quite perfect (looking at you Reagent 1.0!), but I'm sleeping much better working with a stable, slow-moving framework - at the cost of maybe a few more repaints.
- halfmatthalfcat 6y agoMaintaining backwards compatibility is not trivial as your comment seems to allude to. There's obviously a reason things are deprecated and removed from code bases. There's also a reason SemVer exists, to notify you to the fact of breaking changes (whether the library maintainers actually abide by the correct usage is another conversation). Don't want breaking changes? Dont upgrade your stuff, sounds easy to me.
- beders 6y agoYeah, never upgrade, fork and get the security updates somehow in that new fork. Not very convenient. Semver is not an excuse to break your clients. The reason given was "code size and keeping the API surface small". Both are bogus, especially since this is part of an optimizing compiler who will REMOVE unused code. Leaving simple forward from goog.isArray to Array.isArray in there does not cost any maintenance, does not mean extra tests (you already have those) and does not mean your API surface is overblown.
- darksaints 6y agohttps://killedbygoogle.com/ https://killedbygoogle.com/ Cljs never should have been built on top of closure.
- _e 6y agoThese are great points. Google's Closure is open source with an Apache 2.0 license [0]. This is a huge ask but do you think a fork of Google's Closure with the goal of minimizing breaking changes be embraced by everyone who currently rely on Google's Closure? [0] https://github.com/google/closure-library/blob/master/LICENSE https://github.com/google/closure-library/blob/master/LICENS...