Labs/Jetpack/JEP/13

< Labs‎ | Jetpack‎ | JEP
Revision as of 23:29, 4 June 2009 by Aza (talk | contribs) (Created page with 'We need to have some functionality for easily accessing experimental functionality that may be added in the future, but whose APIs are likely to change. It needs to also be easy ...')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

We need to have some functionality for easily accessing experimental functionality that may be added in the future, but whose APIs are likely to change. It needs to also be easy to make the code work once the experimental functionality is integrated into the core.

Inspiration for this comes from Python's __future__ module:

http://docs.python.org/library/__future__.html

An example in Jetpack might go something like:

jetpack.importFromFuture("storage.sqlite")
var mydb = jetpack.storage.sqlite.create("blah")

The nice thing about such syntax is that once storage.sqlite is formally accepted into the core, the author can just remove the jetpack.importFromFuture() call and their code will "just work" (barring any other changes that were made when the functionality was integrated into the core, of course).

A JEP for this would be useful; implementing it should be straightforward.