3 ms·
Kotlins `apply` seems exactly like the much maligned `with` statement from JavaScript, which has been deprecated. Why is it elegant here, but deprecated there?
by hungerstrike 9y ago
Kotlins `apply` seems exactly like the much maligned `with` statement from JavaScript, which has been deprecated.
Why is it elegant here, but deprecated there?
- m00g00 9y agoTook the words right out of my mouth (literally, and 5 minutes faster). Why? I'd say because Douglas Crockford.
- abiox 9y agoi suspect some or many of the reasons it's discouraged in js do not apply to kotlin. as we all know, js has... unique constraints in it's design. why is it deprecated in js?