0.9.1◀Back | Changelog
Thanks to everyone who's taken the time to look into Sugar. This will be my first post on this blog, which I'll use to keep people updated about releases, and as a touch point to get dev input. I have a few hard ideas about the direction I want to take Sugar, but they are all in the end about making life better for JS devs, so input is 100% appreciated.
On that note, the #1 criticism I have received so far is about ES5 compliance, especially that of
Object.create. This is now fixed in v0.9.1, and
Object.create is now
Object.extended. I'm happy with this naming as this alternate constructor is returning an object with extended methods anyway, so this name is more intuitive. A lot more work has already been done to bring the other polyfill methods up to ES5 spec, but I rushed this release out to mitigate changes to the API before they became a problem.
Also new is the use of defineProperty to map the actual methods to the built-in prototypes. This one is big as it means that in modern browsers bad code like
for..in loops iterating over arrays will no longer break. Also remember (this is worth repeating) that Sugar will never modify
Object.prototype directly, so
for..in loops iterating over objects are safe from the start.
I'm looking forward to making some good changes in the coming days, especially better ES5 compliance. Stay tuned!