Extension methods removed

at 2010-07-31 in 5.8-SERIES by friebe (0 comments)

The extension method implementation has been removed from the 5.8 branch again, its quality and performance was way below expectation:

  1. Clumsy declaration syntax
    The xp::extensions('lang.types.ArrayList', __CLASS__); in the static initializer block looks weird, it should be replaced by a more syntax-like feature, e.g. a base class (like enums), annotations (like the new generics implementations) or a construct like export().
  2. Full import
    As of point where a class gets used, its extension methods were globally available, not only for the scope they were used in. This may lead to confusion about methods "appearing" on objects all of a sudden.
  3. Slow implementation
    The first shot came with a serious performance impact, more needed to work around #2
That said, RFC #0189 has been reset to draft status.

It's not dead though, if the issues can be resolved, it will be re-added again.



Subscribe

You can subscribe to the XP framework's news by using RSS syndication.


Categories

News
General
PHP5
Announcements
RFCs
Further reading
Examples
Editorial
EASC
Experiments
Unittests
Databases
5.8-SERIES
Unicode
Language
5.9-SERIES

Related

Find related articles by a search for «Extension».