Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

As someone working on a Ruby AOT compiler (whether it'll ever be finished is another matter...), I'd love to get some spec'ed out extensions for things like this with semantics that explicitly allows implementations to recognise the extension and decide to ignore the default implementation and instead provide it's own version that could e.g. do compile time checks instead of runtime checks, or hoist checks, whenever possible. Or use it for optimisations (e.g. by hoisting out and eliminating other checks and caching method lookups)

Ruby is flexible enough to allow quite a bit of experimentation with stuff like that. Especially because classes can be re-opened, so if worried about performance, it'd be easy enough to allow type annotations (or whatever other extensions people come up with) to live in separate files if people want them to, and conditionally include them only as needed/wanted.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: