You're right. It's definitely the polyfill causing this. In the jsperf link I've posted, you can also see that I did compare it with idx. And both have this issue. Idx does keep the transpiled code a bit smaller though.
We could create something very smart by using proxies and getters, but that will have a serious performance impact in return.
Unfortunately, it will take a long time before we don't need the babel transform any more (or any other polyfill). So at least for now, the issue is quite real. Even though the real cause is the transpiler and not the syntax itself.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
You're right. It's definitely the polyfill causing this. In the jsperf link I've posted, you can also see that I did compare it with
idx
. And both have this issue. Idx does keep the transpiled code a bit smaller though.We could create something very smart by using proxies and getters, but that will have a serious performance impact in return.
Unfortunately, it will take a long time before we don't need the babel transform any more (or any other polyfill). So at least for now, the issue is quite real. Even though the real cause is the transpiler and not the syntax itself.