Re: [PHP-DEV] [RFC] [Under Discussion] Constants in traits

2022-06-22 Thread Stefan Marr via internals
simple. Be conservative, and avoid silent bugs. Please take everything I say with an extra pinch of salt. It has been a long time. Best regards Stefan -- Stefan Marr School of Computing, University of Kent https://stefan-marr.de/research/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] Complete traits redesign for 5.5

2012-12-18 Thread Stefan Marr
t things over christmas. Best regards Stefan -- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Belgium http://soft.vub.ac.be/~smarr Phone: +32 2 629 2974 Fax: +32 2 629 3525 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Traits behavior still up in the air in 5.4

2012-08-01 Thread Stefan Marr
to integrate with them. And the main problem here is that PHP got dynamic properties. If you want to change the semantics to 'local-to-trait'-by-default fields, please provide a patch and an RFC. I won't stop you. On the contrary, it is certainly an appealing option. Throwing a FAT

Re: [PHP-DEV] Traits behavior still up in the air in 5.4

2012-08-01 Thread Stefan Marr
gt;> I assume we are talking about: >> http://php.net/manual/en/language.oop5.traits.php >> >> Static variables and members/properties are not related at all. The writer >> of the documentation didn't get the wording correct. Please feel free to >> submit a

Re: [PHP-DEV] Traits behavior still up in the air in 5.4

2012-08-01 Thread Stefan Marr
o submit a patch. The example code given in the manual is correct. (Example #9 Static Variables) The section heading is misleading. It is not about static members, and members and variables are not synonym. Members are synonym with properties, and properties can be static. Static variables are loca

Re: [PHP-DEV] Traits behavior still up in the air in 5.4

2012-07-31 Thread Stefan Marr
; > I don't know what's the bug here: a doc bug, or a code bug. For consistency, > static properties should work, if instance properties work. Nothing is gained > supporting it half-way. Could you please point me *exactly* to the paragraph where we have something written about

Re: [PHP-DEV] RFCs and organisation

2012-07-26 Thread Stefan Marr
of semantics - a patch And then based on discussion: - FAQ or common misconceptions - alternative proposals - rejected features - change log Best regards Stefan -- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Belgium http://soft.vub.ac.be/~smarr Ph

Re: [PHP-DEV] Enforcing final in traits

2012-05-04 Thread Stefan Marr
lities are seen as hints for the standard usage of a trait, but can be changed during composition. Thanks Stefan -- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Belgium http://soft.vub.ac.be/~smarr Phone: +32 2 629 2974 Fax: +32 2 629 3525

Re: [PHP-DEV] Traits and memory size

2012-04-10 Thread Stefan Marr
memory benefit of sharing code in traits, compared to manual copy and past. Best regards Stefan -- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Belgium http://soft.vub.ac.be/~smarr Phone: +32 2 629 2974 Fax: +32 2 629 3525 -- PHP Internals - PHP R

Re: [PHP-DEV] Git Migration: Status Update for Todays Migration

2012-03-18 Thread Stefan Marr
case there is a better way, please let me know. Thanks Stefan -- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Belgium http://soft.vub.ac.be/~smarr Phone: +32 2 629 2974 Fax: +32 2 629 3525 -- PHP Internals - PHP Runtime Development Mailing List

Re: [PHP-DEV] Git Migration: Status Update

2012-03-04 Thread Stefan Marr
rate commits + pushes? Thanks Stefan -- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Belgium http://soft.vub.ac.be/~smarr Phone: +32 2 629 2974 Fax: +32 2 629 3525 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visi

Re: [PHP-DEV] HEADS UP: 5.4 branch is open again

2012-03-01 Thread Stefan Marr
Hi: On 02 Mar 2012, at 01:33, David Soria Parra wrote: > just a heads up. The PHP_5_4 branch is open for commits again. Thanks to Stat and you for all the work! When is cycle for 5.4.1 going to start? I got a few traits-related patches waiting for it. Thanks Stefan -- Stefan Marr Softw

Re: [PHP-DEV] Bug #61033 __FUNCTION__ doesn't report correctly in alias trait methods

2012-02-10 Thread Stefan Marr
ls in traits? Best regards Stefan -- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Belgium http://soft.vub.ac.be/~smarr Phone: +32 2 629 2974 Fax: +32 2 629 3525 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http:/

[PHP-DEV] Test execution and created files

2012-01-30 Thread Stefan Marr
60771.phpt > > -- > PHP CVS Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Belgium http://soft.vub.ac.be/~smarr Phone: +32 2 629 2974 Fax: +32 2 629 3525

Re: [PHP-DEV] Urgent patch for traits in PHP 5.4

2012-01-17 Thread Stefan Marr
nly had a chance to have a very brief look, but the code seems to look good and the tests are there and work, too. Thanks Dmitry! Best regards Stefan -- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Belgium http://soft.vub.ac.be/~smarr Phone:

Re: [PHP-DEV] Urgent patch for traits in PHP 5.4

2012-01-16 Thread Stefan Marr
keep them as compile-time constants referring to the actual place where they occur. Adapting them to reflect the using classes would at least not seem to be the intuitive semantics, I think. Best regards Stefan -- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1

Re: [PHP-DEV] Urgent patch for traits in PHP 5.4

2012-01-15 Thread Stefan Marr
fan On 14 Jan 2012, at 23:22, Stefan Marr wrote: > I was thinking that we might want to handle that in zend_do_early_binding but > usually these ops get changed to NOPs after they have been evaluated. > And that's not what we need when the op_arrays are shared, I think. &

Re: [PHP-DEV] Urgent patch for traits in PHP 5.4

2012-01-14 Thread Stefan Marr
Hi Dmitry: On 14 Jan 2012, at 01:24, Stefan Marr wrote: > On 13 Jan 2012, at 19:53, Stas Malyshev wrote: > >> trait foo { >> public $bar = __CLASS__; >> } > > Breakpoint 3, zend_do_early_binding () at zend_compile.c:4602 > 4602 zen

Re: [PHP-DEV] Urgent patch for traits in PHP 5.4

2012-01-13 Thread Stefan Marr
argc=2, argv=0x7fff5fbff4b0) at php_cli.c:983 #6 0x00010049d8c5 in main (argc=2, argv=0x7fff5fbff4b0) at php_cli.c:1356 -- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Belgium http://soft.vub.ac.be/~smarr Phone: +32 2 629 2974 Fax: +32 2 629 3525 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Urgent patch for traits in PHP 5.4

2012-01-13 Thread Stefan Marr
th regard to trait aliases? And, I would have one stylistical request: could you separate out the optimizations you do in zend_language_scanner.l? I think it would be better to have the proper use of interned strings committed on their own. Especially, since they regard not only trait-related func

Re: [PHP-DEV] Urgent patch for traits in PHP 5.4

2012-01-13 Thread Stefan Marr
l performance relevant changes from the top of my head. Best regards Stefan -- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Belgium http://soft.vub.ac.be/~smarr Phone: +32 2 629 2974 Fax: +32 2 629 3525 -- PHP Internals - PHP Runtime Development

Re: [PHP-DEV] Urgent patch for traits in PHP 5.4

2012-01-13 Thread Stefan Marr
Hi: On 13 Jan 2012, at 11:13, Stefan Marr wrote: > From the top of my head, it is the handling of __CLASS__ and the handling of > static variables in methods. You did not mention that, is it taken care of > explicitly, or do traits now share static state? The later would not be &

Re: [PHP-DEV] Urgent patch for traits in PHP 5.4

2012-01-13 Thread Stefan Marr
t into the process now, too. Especially if it breaks binary compatibility. I will take at a look at the patch later today. Thanks Stefan -- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Belgium http://soft.vub.ac.be/~smarr Phone: +32 2 629 2974 Fax:

Re: [PHP-DEV] Return Type Hinting for Methods RFC

2011-12-22 Thread Stefan Marr
example to bridge the worlds between the 'PHP should be more like Java' and the 'PHP should be more like PHP' people. Best regards Stefan -- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Belgium http://soft.vub.ac.be/~smarr P

Re: [PHP-DEV] some notes about traits

2011-11-16 Thread Stefan Marr
-) Yes it is. I think it is especially important that other people actually write down their understanding of the mechanism. Blog posts, mailing list posts, improved documentation, they are all important. Thanks Stefan -- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-10

Re: [PHP-DEV] some notes about traits

2011-11-11 Thread Stefan Marr
s too high - but my first impression of this feature is that > it's crippled and somewhat half-baked... If there was a deliberate and > logical reason for not supporting these features, I would like to > understand why. If not - great work so far, but perhaps this feature is no

Re: [PHP-DEV] Re: [PHP-QA] Re: [PHP-DEV] CI for 5.4

2011-11-03 Thread Stefan Marr
d is back > to normal, that way the list wouldn't be spammed, but some active > contributors would be still continuously bugged. Does that meant that the committer could get an unconditional email with the result of his/her commit? Sounds very reasonable to me. Best regards Stef

Re: [PHP-DEV] CI for 5.4

2011-11-03 Thread Stefan Marr
at would be great. Thanks to people like Antony, obviously stupid bugs get caught pretty fast. Thanks Stefan -- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Belgium http://soft.vub.ac.be/~smarr Phone: +32 2 629 2974 Fax: +32 2 629 3525 -- PH

Re: [PHP-DEV] CI for 5.4

2011-11-03 Thread Stefan Marr
e it breaks something? I just had such a case, where my local setup was insufficient to catch it. Thanks a lot Stefan -- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Belgium http://soft.vub.ac.be/~smarr Phone: +32 2 629 2974 Fax: +32 2 629 35

Re: [PHP-DEV] Revisit: Traits requiring composing class to implement interface

2011-10-24 Thread Stefan Marr
problem that cannot occur is that you get a runtime error because a method is completely missing from a class. You can neither exclude nor rename a method. We do not have exclude, and we only got aliasing. Neither of these mechanisms will lead to a case where a method is completely missing from

Re: [PHP-DEV] Revisit: Traits requiring composing class to implement interface

2011-10-23 Thread Stefan Marr
uation you describe cannot occur in the sense that a method is missing from the class. However, you can of course provide incompatible method implementations. (Which does not make traits any different from any other way to implement an interface.) Best regards Stefan -- Stefan Marr Software

Re: [PHP-DEV] 5.4 undocumented stuff

2011-10-17 Thread Stefan Marr
Hi: On 16 Oct 2011, at 04:15, Stas Malyshev wrote: > class_uses - Stefan Added with: http://news.php.net/php.doc.cvs/8942 Furthermore, I added the documentation of __TRAIT__, and extended the docs for __CLASS__: http://news.php.net/php.doc.cvs/8943 Best regards Stefan -- Stefan M

Re: [PHP-DEV] Re: typehinting traits

2011-10-17 Thread Stefan Marr
lso style-wise is more than welcome. Thanks Stefan -- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Belgium http://soft.vub.ac.be/~smarr Phone: +32 2 629 2974 Fax: +32 2 629 3525 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe

[PHP-DEV] Re: typehinting traits

2011-10-17 Thread Stefan Marr
current situation might be more friendly to the teacher. Another design might offer more freedom/power... Best regards Stefan > > -- > Ferenc Kovács > @Tyr43l - http://tyrael.hu -- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Be

Re: [PHP-DEV] Issues with Traits / php crashes

2011-10-16 Thread Stefan Marr
row down the origin of such crashes. Best regards Stefan > > thanks in advance! > > harald > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > -- Stefan Marr Software Languages Lab Vrije Universiteit

Re: [PHP-DEV] Reflection, Traits, Aliasing

2011-08-09 Thread Stefan Marr
de example here, so I thought I'd > point > out that the problem only seems to happen if you include the trait definition > from an external file. Thanks Keloran and Joey, it is on my todo list, and I will look into it over the weekend. Best regards Stefan -- Stefan Marr Software

Re: [PHP-DEV] Reflection, Traits, Aliasing

2011-07-25 Thread Stefan Marr
Hi Johannes: 2011/7/25 Johannes Schlüter : > Now I use reflection on this: > > $rc = new ReflectionClass('C'); > print_r($rc->getTraitAliases()); > > Array > ( >    [tc] => T1::t1 > ) Great, that is nice. > So far so nice but I'm missing the information where C::t1() is coming > from. In the r

[PHP-DEV] Fwd: Bug #55214 [Com]: use of __CLASS__ within trait returns trait name not class name

2011-07-24 Thread Stefan Marr
Hi: I would like to ask for a review of the solution for the following issue. A patch is currently available at: https://bugs.php.net/patch-display.php?bug=55214&patch=__CLASS__-in-traits.002.patch&revision=1311532096 The problem is that __CLASS__ used in the body of a trait method does not behav

Re: [PHP-DEV] 5.4a2 trait attribute name conflict resolution

2011-07-23 Thread Stefan Marr
Hi Mike: On Sat, Jul 23, 2011 at 6:49 PM, Mike Stowe wrote: > So am I understanding correctly that the initial properties must be identical > both in type and value, otherwise it would throw an error. To me that would > make the most sense as they could be overridden in a construct or other >

Re: [PHP-DEV] 5.4a2 trait attribute name conflict resolution

2011-07-23 Thread Stefan Marr
On Fri, Jul 22, 2011 at 8:41 PM, Jonathan Bond-Caron wrote: > On Fri Jul 22 01:46 PM, Alex Howansky wrote: >> >> Sure, but in this case, I created the conflict intentionally because I >> *want* to override it, and I'm not allowed to like I am with methods. >> Don't you think that's inconsistent? >

Re: [PHP-DEV] 5.4a2 trait attribute name conflict resolution

2011-07-23 Thread Stefan Marr
Hi Alex: On Fri, Jul 22, 2011 at 7:46 PM, Alex Howansky wrote: > >> Best practice, always choose trait property names carefully/~unique >> so that you don't run into conflicts. > > Sure, but in this case, I created the conflict intentionally because I > *want* to override it, and I'm not allowed

Re: [PHP-DEV] 5.4a2 trait attribute name conflict resolution

2011-07-23 Thread Stefan Marr
Hi: On Fri, Jul 22, 2011 at 5:17 PM, Alex Howansky wrote: > > Hello folks, > > I've just grabbed 5.4a2 to play with traits. I've found some behaviour which > I'm not sure is a bug, an inconsistency, or a design decision. > > Consider a trait and a class that implements it but also overrides both

Re: [PHP-DEV] autoconf 2.60+ support

2011-05-15 Thread Stefan Marr
gt; Not sure this is a problem since the generated configure script works > just fine. Same warning on OSX 10.6 with autoconf 2.68 (macports) However, configure and make work fine, too. Best regards Stefan -- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2

Re: [PHP-DEV] 5.4 again

2011-05-11 Thread Stefan Marr
initely demonstrate the ability to get moving again. An important sign to the larger community. However, the stability/instability of the feature set should be clearly defined. Thanks Stefan -- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Belgium

Re: [PHP-DEV] 5.4 again

2011-05-10 Thread Stefan Marr
probably be stalled in the end. I am not to optimistic about an actual release date within 2011. Best regards Stefan -- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Belgium http://soft.vub.ac.be/~smarr Phone: +32 2 629 2974 Fax: +32 2 629 3

Re: [PHP-DEV] 5.4 again

2011-05-09 Thread Stefan Marr
karma to push the code into the official repository. First it was developed completely outside of PHP and without asking anyone from internals, just because I wanted it... That is how open source works. Best regards Stefan -- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinla

Re: [PHP-DEV] 5.4 again

2011-05-09 Thread Stefan Marr
ourselves to sort out the controversial stuff. Best regards Stefan -- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Belgium http://soft.vub.ac.be/~smarr Phone: +32 2 629 2974 Fax: +32 2 629 3525 -- PHP Internals - PHP Runtime Development M

Re: [PHP-DEV] Releases, trunk, policy and the wardrobe (Was: Re: [PHP-DEV] RFC: built-in web server in CLI.)

2011-04-23 Thread Stefan Marr
and schedule. For me it is currently really hard to see what the next steps are. If a release manager gives me a deadline, I am sure that all the traits-related things can be finished. Best regards Stefan -- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Bruss

Re: [PHP-DEV] Experiments with a threading library for Zend: spawning a new executor

2011-01-19 Thread Stefan Marr
Hi Sam: (becomes off-topic here, but for the sake of argument) On 19 Jan 2011, at 04:14, Sam Vilain wrote: > On 19/01/11 10:50, Stefan Marr wrote: >> On 18 Jan 2011, at 22:16, Sam Vilain wrote: >>> there doesn't seem to >>> be an interpreter under the sun w

Re: [PHP-DEV] Experiments with a threading library for Zend: spawning a new executor

2011-01-18 Thread Stefan Marr
thub.com/smarr/RoarVM). Best regards Stefan -- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Belgium http://soft.vub.ac.be/~smarr Phone: +32 2 629 2974 Fax: +32 2 629 3525 -- PHP Internals - PHP Runtime Development Mailing List To unsubscri

Re: [PHP-DEV] Traits and Properties

2011-01-09 Thread Stefan Marr
Hi: On 09 Jan 2011, at 17:23, Stefan Marr wrote: >> This is the same with interfaces. What does class_exists('some_trait') >> do? - I assume that returns true too. > It does return false for interfaces, that should be consistent and return > false for traits, too. O

Re: [PHP-DEV] Traits and Properties

2011-01-09 Thread Stefan Marr
On 06 Jan 2011, at 15:33, Johannes Schlüter wrote: > On Thu, 2011-01-06 at 14:38 +0100, Stefan Marr wrote: >> >> On of those things is that you actually use ReflectionClass to reflect >> on a trait. >> That is really an implementation detail, and should be changed to

Re: [PHP-DEV] Extensions to traits

2011-01-06 Thread Stefan Marr
der you want. And in get() you can also just use parent::, no? The only problem with aliases is that you do not get self-recursion, but you do not use that here. > > > Final note regarding grafts > === Grafts are dead. There is no implementation, and I do see traits and grafts as an either the one or the other, but not both. We do not need to make PHP more complex... All in all, I would like to have all the proposals recorded somewhere, in a way easily findable when you look up traits RFCs. Should be possible to group them in a namespace on the wiki, right? Thanks again and sorry for 'rejecting' most of your ideas, but thats not final, I am still open for arguments. By breaking up the topics into subthreads, it hopefully makes it easier for the community to comment on the different topics, too. Best regards Stefan -- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Belgium http://soft.vub.ac.be/~smarr Phone: +32 2 629 2974 Fax: +32 2 629 3525 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Extensions to traits

2011-01-06 Thread Stefan Marr
rom: class proper? We are talking about the body of a class, right? Well, but I will stop here, and try to cover the rest in the next mail... Best regards Stefan -- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Belgium http://soft.vub.ac.be/~sm

Re: [PHP-DEV] Extensions to traits

2011-01-06 Thread Stefan Marr
are composed, while the original class is seen as another trait. That idea has certainly something to it. > > use SaySomething { > sayIt = null; > } > use SaySomething { > unset sayIt; > } > use SaySomething { > sayIt = SaySomething::sayIt; &g

Re: [PHP-DEV] Traits and Properties

2011-01-06 Thread Stefan Marr
it. Best regards Stefan -- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Belgium http://soft.vub.ac.be/~smarr Phone: +32 2 629 2974 Fax: +32 2 629 3525 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Traits and Properties

2011-01-06 Thread Stefan Marr
look for alternative keyword for 'require'. Yes, Tom worked on that a while ago, but it was to easy to implement it in a library for JavaScript. To easy to be considered for a language feature... Best regards Stefan -- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinl

Re: [PHP-DEV] Traits and Properties

2011-01-03 Thread Stefan Marr
Hi Ben: On 03 Jan 2011, at 10:35, Ben Schmidt wrote: > > OK. So this comment from your email is outdated?: Yes, outdated since this email: http://marc.info/?l=php-internals&m=129288735205036&w=2 Best regards Stefan -- Stefan Marr Software Languages Lab Vrije Universiteit Bruss

Re: [PHP-DEV] Traits and Properties

2011-01-03 Thread Stefan Marr
but the language does not help you in solving the problem. Best regards Stefan -- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Belgium http://soft.vub.ac.be/~smarr Phone: +32 2 629 2974 Fax: +32 2 629 3525 -- PHP Internals - PHP Runtime De

Re: [PHP-DEV] Traits and Properties

2011-01-03 Thread Stefan Marr
ng behavior is not possible, which simplifies the language constructs for handling behavioral conflicts. Best regards Stefan -- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Belgium http://soft.vub.ac.be/~smarr Phone: +32 2 629 2974 Fax: +32 2 629 3525

Re: [PHP-DEV] Traits and Properties

2010-12-20 Thread Stefan Marr
are given in the test cases. > > --Larry Garfield > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > -- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Belgi

Re: [PHP-DEV] Traits and Properties

2010-12-19 Thread Stefan Marr
f the class does not override all property definitions in traits (this is the case for methods). I think that will be useful for the very same reason. And well, I hope an educative error message will steer the crowed in the right direction to use accessors. Best regards Stefan -- Stefan Marr

Re: [PHP-DEV] Traits and Properties

2010-12-18 Thread Stefan Marr
would be inconsistent with the design of traits. > though I'd be happy with simply E_FATAL until > people start using traits What do you mean by the second part? (until people start using traits) Changing the design retrospectively does not seem to be the best option? Best regards Stef

Re: [PHP-DEV] Traits and Properties

2010-12-18 Thread Stefan Marr
easonable... --TEST-- Conflicting properties with different visibility modifiers should be merged to the most restrictive modifier. --FILE-- hello; } } $t = new TraitsTest; ?> --EXPECTF-- Fatal error: Conflicting definitions for property TraitsTest::$hello provided by THel

Re: [PHP-DEV] Traits and Properties

2010-12-16 Thread Stefan Marr
ng properties with different visibility modifiers should be merged to the most restrictive modifier. --FILE-- hello = "foo"; ?> --EXPECTF-- Fatal error: Cannot access private property TraitsTest::$foo in %s on line %d On 11 Dec 2010, at 17:47, Stefan Marr wrote: > Hi:

Re: [PHP-DEV] Traits and Properties

2010-12-13 Thread Stefan Marr
Hi Richard: On 13 Dec 2010, at 14:31, Richard Quadling wrote: > On 11 December 2010 23:31, Stefan Marr wrote: >> The current status of the property behavior is not yet documented explicitly > > On the assumption that traits WILL include properties (with > visibility) and a

Re: [PHP-DEV] Traits and Properties

2010-12-13 Thread Stefan Marr
t provide any safety provisioning for state, i.e., there is no collision handling for properties, the question is, how do we either promote to use explicit accessors or how do we deal with the inevitable and certainly justified use of properties in one or the other way. Best regards Stefan -

Re: [PHP-DEV] Traits and Properties

2010-12-12 Thread Stefan Marr
warning would be annoying for the last example, since here the state does not collide... Best regards Stefan PS: there has been discussion on stateful traits before, but the language solutions to that where considered to complex. -- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Ple

Re: [PHP-DEV] Traits and Properties

2010-12-11 Thread Stefan Marr
onsultant > http://sebastian-bergmann.de/ http://thePHP.cc/ > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > -- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-

Re: [PHP-DEV] Traits and Properties

2010-12-11 Thread Stefan Marr
y implied since it is not handled at all... And, it is the only open question that 'needs' to be solved since it is an inconsistency. For instance the 'require Interface' is more like an additional feature. Best regards Stefan > > Thanks! > > On Sat, Dec 11, 2010

[PHP-DEV] Traits and Properties

2010-12-11 Thread Stefan Marr
ICT notice? Options here are a notice whenever a property is defined in a trait, or whenever properties are silently merged. Comments very welcome. Thanks Stefan -- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Belgium http://soft.vub.ac.be/~sm

Re: [PHP-DEV] Traits expecting interfaces implicitly leads to expensive runtime checks

2010-12-11 Thread Stefan Marr
that needs to implement the interface class Example implements Iterator { use IteratorUser; } Are there any objections to implementing this? Thanks Stefan -- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Belgium http://soft.vub.ac.be/~smarr Phone

Re: [PHP-DEV] Traits expecting interfaces implicitly leads to expensive runtime checks

2010-12-10 Thread Stefan Marr
good keyword to be reused. Best Regards Stefan -- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Belgium http://soft.vub.ac.be/~smarr Phone: +32 2 629 2974 Fax: +32 2 629 3525 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe,

Re: [PHP-DEV] Traits expecting interfaces implicitly leads to expensive runtime checks

2010-12-10 Thread Stefan Marr
ething like > > trait IteratorHelper expects Iterator { > ... > } > ?> :D That was exactly my thought when I was writing my first answer. My second thought was, damn, not another keyword... But since you also seem to see the need, we should give it a thought. Anyone else

Re: [PHP-DEV] Traits expecting interfaces implicitly leads to expensive runtime checks

2010-12-09 Thread Stefan Marr
you want the following trait? trait AHelper { abstract function blah(); function meh() { // hoping we get used w/ instances of A ... return $this->blah() * 5; } } You want to avoid the fatal error during runtime, right? Do you prefer dynamic checks over compile time checks?

Re: [PHP-DEV] Traits expecting interfaces implicitly leads to expensive runtime checks

2010-12-09 Thread Stefan Marr
t; Does that what you want it to do? Best regards Stefan -- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Belgium http://soft.vub.ac.be/~smarr Phone: +32 2 629 2974 Fax: +32 2 629 3525 -- PHP Internals - PHP Runtime Development Mailing List To

Re: [PHP-DEV] Traits and Conflicts: Collisions as Warnings or Fatal?

2010-12-07 Thread Stefan Marr
case that the engine is in an unrecoverable state, thus, the code actually will work in that case, but perhaps produce unexpected results. In general, PHP uses fatals far to often for my taste, but well, to keep it consistent, we can go fatal here, too. Is there a general consensus on that? Thanks S

[PHP-DEV] Traits and Conflicts: Collisions as Warnings or Fatal?

2010-12-05 Thread Stefan Marr
o? Best regards Stefan -- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Belgium http://soft.vub.ac.be/~smarr Phone: +32 2 629 2974 Fax: +32 2 629 3525 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www

Re: [PHP-DEV] RFC: C-sharp style property get/set syntax for PHP

2010-12-01 Thread Stefan Marr
sset() still makes sense. property_exists() and unset() should be dealt with carefully in another way. Best regards Stefan -- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Belgium http://soft.vub.ac.be/~smarr Phone: +32 2 629 2974 Fax: +32 2 629 3525 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] RFC: C-sharp style property get/set syntax for PHP

2010-12-01 Thread Stefan Marr
erty represents and not the fact that there are methods. So, from my point of view isset/unset have perfectly valid semantics on many of the usual cases. Even so, I agree, there are cases where that is not so, but in those cases isset/unset could be specialize like set/get. Best regards Stefan

Re: [PHP-DEV] RFC: C-sharp style property get/set syntax for PHP

2010-12-01 Thread Stefan Marr
the docu: isset — Determine if a variable is set and is not NULL There is nothing confusing about isset($this->Hours) == FALSE in your example if isset($this->seconds) == FALSE. Best regards Stefan -- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050

Re: [PHP-DEV] RFC: C-sharp style property get/set syntax for PHP

2010-11-30 Thread Stefan Marr
Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > -- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Belgium http://soft.vub.ac.be/~smarr Phone: +32 2 629 2974 Fax: +32 2 629 3525 -- PHP Internals - PHP Ru

Re: [PHP-DEV] Hold off 5.4

2010-11-23 Thread Stefan Marr
r internal classes - currently destroy_zend_class does not handle that case For support of internal classes was no clear interest yet, so it never got done. Is that a show stopper? Thanks Stefan -- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels

Re: [PHP-DEV] Traits and static methods

2010-11-22 Thread Stefan Marr
; } > > return $instance; > } http://svn.php.net/viewvc/php/php-src/trunk/Zend/tests/traits/language013.phpt?revision=300283&view=markup The test case says it works ;) Best regards Stefan -- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussel

Re: [PHP-DEV] Trait behavior when providing a new name while no conflict exists

2010-11-18 Thread Stefan Marr
s a bug. It works without the Hello:: part and it should also work with the Hello::. Fixed with the following commit: http://svn.php.net/viewvc?view=revision&revision=305512 Best regards Stefan -- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / B

Re: [PHP-DEV] Traits and static methods

2010-11-17 Thread Stefan Marr
that statement was referring to. http://wiki.php.net/rfc/horizontalreuse Hope that helps Best regards Stefan On 17 Nov 2010, at 08:55, Stefan Marr wrote: > Hi Simas: > > On 17 Nov 2010, at 07:32, Simas Toleikis wrote: >> Alright then, I am sure someone will find more uses for static

Re: [PHP-DEV] Another question on traits

2010-11-17 Thread Stefan Marr
> class MyHelloWorld implements IHello { > use SayHello; > } > > $o = new MyHelloWorld(); > var_dump($o instanceof IHello); // bool (true) > ?> If that does not work, it is a bug I think. Best regards Stefan > > thx, > > -nathan -- Stefan Marr

Re: [PHP-DEV] Traits and static methods

2010-11-16 Thread Stefan Marr
d in one way or another before or after > first 5.4 alphas! :) Send me the tests/phpt-files for it, and I will have a lock at it over the weekend. Best regards Stefan -- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Belgium http://soft.vub.ac.be/~

Re: [PHP-DEV] Traits and static methods

2010-11-16 Thread Stefan Marr
#x27;t recall any implementation details. Haven't touched the code for too long. From the top of my head, I don't see why it should not work. If I would have elaborated a bit more what I was thinking when I wrote that comment... Following the motto 'it is just compiler assiste

Re: [PHP-DEV] GPU Acceleration

2010-11-12 Thread Stefan Marr
if you stay in the Web app/DB-bound application area. Best regards Stefan [1] https://github.com/facebook/hiphop-php [2] http://www.phpcompiler.org/ -- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Belgium http://soft.vub.ac.be/~smarr Phone: +32 2

Re: [PHP-DEV] RE: [SPAM] Re: [PHP-DEV] rename T_PAAMAYIM_NEKUDOTAYIM to T_DOUBLE_COLON

2010-11-01 Thread Stefan Marr
ng what the parser would have expected. Changing to lemon is the only way to actually achieve something in the long run... Best regards Stefan -- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Belgium http://soft.vub.ac.be/~smarr Phone: +32 2 6

Re: [PHP-DEV] Traits

2010-08-28 Thread Stefan Marr
... >>> >>> Best regards >>> Stefan >>> >>> PS: Snapshots are here http://snaps.php.net/ >>> >>> >>> >>> >> >> >> -- >> PHP Internals - PHP Runtime Development Mailing List >> To u

[PHP-DEV] Traits and static variables

2010-06-05 Thread Stefan Marr
Hi: Was just thinking about some details of the traits implementation. From my perspective, static variables in methods should work like the method would have been actually implemented in the class using the traits. Thus, static variables should be independent for the different traits usages.

Re: [PHP-DEV] Traits

2010-06-04 Thread Stefan Marr
Hi: On 04 Jun 2010, at 13:46, Christian Kaps wrote: > A short while ago there was a discussion about implementing Traits in > the next PHP version. How is the status of this? The code is committed to trunk, and thanks to the community there have already been some improvements and fixes for corn

Re: [PHP-DEV] Re: svn: /php/php-src/trunk/ UPGRADING Zend/zend_builtin_functions.c

2010-05-07 Thread Stefan Marr
- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > -- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Belgium http://soft.vub.ac.be/~smarr Phone: +32 2 629 2974 Fax: +32 2 629 3525

[PHP-DEV] Re: [PHP-CVS] svn: /php/php-src/trunk/Zend/tests/traits/ error_001.phpt error_002.phpt error_003.phpt error_004.phpt error_005.phpt error_006.phpt error_007.phpt error_008.phpt error_009.p

2010-05-06 Thread Stefan Marr
Hi Felipe: Hope you don't mind that I post it on the list, think the discussion should be properly archived. On 06 May 2010, at 18:30, Felipe Pena wrote: > Hello, > > 2010/5/6 Stefan Marr > Hi Felipe: > > On 05 May 2010, at 22:00, Felipe Pena wrote: > > O

Re: [PHP-DEV] Obscure token name

2010-04-27 Thread Stefan Marr
On 27 Apr 2010, at 08:50, mathieu.suen wrote: > Then T_DOUBLE_COLON would have been perfectly clear. Honestly, token names in error messages is so '80s. Instead of fixing internal details, form the users point of view it might be better to not expose token names at all, but have meaningful parser

Re: [PHP-DEV] traits

2010-04-22 Thread Stefan Marr
On 22 Apr 2010, at 22:17, Rasmus Lerdorf wrote: > On 04/22/2010 01:05 PM, Stefan Marr wrote: >>> I must have missed some emails, so which one of the numerous proposals is >>> this based on? I have some comments on the tests, but I don't want to start >>>

Re: [PHP-DEV] traits

2010-04-22 Thread Stefan Marr
-8829 MSN: s...@zend.com > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > -- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Belgium http://soft.vub.ac.be/~smarr Ph

Re: [PHP-DEV] Re: svn: /php/php-src/trunk/Zend/tests/ traits/bugs/abstract-methods01.phpt traits/bugs/abstract-methods02.phpt traits/bugs/abstract-methods03.phpt traits/bugs/abstract-methods04.phpt tr

2010-04-22 Thread Stefan Marr
Hi Sebastian: On 22 Apr 2010, at 15:37, Sebastian Bergmann wrote: > Am 15.04.2010 23:39, schrieb Stefan Marr: >> Added traits test cases. No engine changes for now. [TRAITS] > do you have an ETA for when the actual implementation will be committed? I am currently fighting with some of

  1   2   >