Hey Deleu, I ended up on this list in the first place because I wanted to figure out how to implement type aliases. I can confidently say why no one wants to touch it with a ten-foot pole: implementing this will require refactoring the entire type system. There currently isn't a 'type table'; supporting type aliases will probably require one. I was able to hack something together that used the import statements as a way to work without that much changes (I never got autoloading to work, but I suspect that was my unfamiliarity with the code, not that it was impossible):
use int|float as Number; at the top and it would work with fairly minimal changes to the engine. Anything more complex or different required a huge refactoring. However, from previous discussions, when that syntax was brought up, it was shot down. It appears that people want code-wide aliases, which goes back to refactoring (to the point of re-implementing an entire type system) and people can't agree that it's a good idea in the first place (i.e., what if you think int|float is Number, but some other library has only float aliased to Number?) and then that can be solved via imports ... but how does that work? Basically, since it requires reimplementing an entire type system, I think the maintainers (this is my impression, I'm not speaking for them) want to be 100% sure what the syntax will be, how it will work, and more importantly, agree as much as possible on that before ripping out the existing system and replacing it with something else. Anyway, that's my opinion on the matter, I'm sure others will have different opinions. :) Rob Landers Utrecht, Netherlands -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php