5.8-SERIES

Protected member access via reflection

at 2010-04-04 in 5.8-SERIES by friebe

The next major XP Framework series, 5.8, now allows invoking protected methods reflectively:

<?php 
class Invoke extends Object {

protected
function target() {
Console::writeLine
('Invoked');
}

public
function run() {
$this->getClass()->getMethod('target')->invoke($this);
}

public
static function main(array $args) {
create
(new self())->run();
}
}
?>
In the 5.7-SERIES, this would raise a lang.reflect.TargetInvocationException; whereas now it prints "Invoked" to the console as expected.


(more)

PHP 5.3.2 support

at 2010-03-09 in 5.8-SERIESPHP5 by friebe

Following the PHP 5.3.2 release a couple of days ago we now officially support this new PHP version with the upcoming XP 5.7.8-RELEASE. Also tested successfully: The 5.8 development branch.



RFC #0197: Type literals in tokens

at 2010-02-18 in RFCs5.8-SERIES by friebe

Scope of Change
A common way to denote type literals in generated sourcecode will be introduced.

Rationale
An example of where this is used is the type dispatching methods described in RFC #0195. Another example is generics generation, as described in RFC #0193.

Read the full RFC here



RFC #0193: Generics optimization

at 2010-02-18 in 5.8-SERIESRFCs by friebe

Scope of Change
Generics will be optimized.

Rationale

  • Improve performance
  • Enable reflection for generics
  • Enable reflective creation of generics
  • Support primitives a generic arguments

Read the full RFC here



RFC #0181: SystemExit

at 2009-11-13 in 5.8-SERIESRFCs by friebe

Scope of Change
Calls to exit() will be replaced by a method that throws a lang.SystemExit exception.

Rationale
Be able to catch sourcecode that tries to exit.

Read the full RFC here



Extension methods: Swiss army knives without the anti-pattern

at 2009-08-29 in Experiments5.8-SERIESRFCs by friebe

Swiss Army KnifeThe following calls a method called "sorted" on an instance of the lang.types.ArrayList class. The ArrayList class doesn't have such a method, and we'll thus get a nice "call to undefined method" error shortly before our program is terminated.

<?php 
$array= new ArrayList(3, 1, 2);
$sorted= $array->sorted();
?>

We could add this method to the class, but the next request would be to have filter(), map(), join(), collect(), partition(), and whatever else methods in this class, which would turn it into the "swiss army knife" anti-pattern.


(more)

5_8 Branch created

at 2009-08-25 in Announcements5.8-SERIESReleases by friebe

Branch To begin efforts on the various features to be released in the 5.8-Series, we've created a 5_8 branch. This branch will incorporate changes such as errors for malformed exceptions, the catchable exit(), typeof(), private and protected member and method access and extension methods, as well as deprecate the ref and deref functionality and serves as a showcase for the upcoming series.

Main development will continue in trunk (the 5.7-series) though, features and bugfixes added there will be merged to the branch!

For developers, this branch can be checked out as follows:

  $ cd devel/xp.public
$ svn co svn+ssh://${USER}@xp-framework.net/ home/svn/xp/branches/xp5_8 branches/xp5_8



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