Open nickradford opened 8 years ago
It's definitely cleaner than messing with Number, that's for sure. Maybe to avoid global clutter... This is more production friendly, but more annoying for prototyping:
let z = {
seconds() {
return this * 1000;
},
minutes() {
return (this * 60)::z.seconds();
}
}
console.log(3::z.minutes());
Yeah, thought a module system would be even better.
import {minutes} from 'Z';
console.log(4::minutes())
:+1: I like that
Just a thought, but this seems like a potentially awesome syntax. @aeharding whatcha think?