Re: [PHP-DEV] new feature -> with()

2007-10-10 Thread Keryx Web
Rasmus Lerdorf skrev: I think that is one of the strongest reasons not to implement something actually. If there is a way to do something in a clear and concise syntax, adding an alternate less clear syntax that isn't immediately obvious to everyone simply obfuscates the language. The other fat

Re: [PHP-DEV] new feature -> with()

2007-10-10 Thread Stut
Rasmus Lerdorf wrote: Stut wrote: It may not be clear to some people, but there are many things in the every language that aren't necessarily obvious and I don't think that's a reason not to implement something. I think that is one of the strongest reasons not to implement something actually.

Re: [PHP-DEV] new feature -> with()

2007-10-10 Thread Rasmus Lerdorf
Stut wrote: > It may not be clear to some people, but there are many things in the > every language that aren't necessarily obvious and I don't think that's > a reason not to implement something. I think that is one of the strongest reasons not to implement something actually. If there is a way t

Re: [PHP-DEV] new feature -> with()

2007-10-10 Thread Ralph Schindler
--- $class=new class; with($class) { do_something(); do_more(); do(); } What more value does this hold over implementing fluent interfaces which are already possible? Assuming class Foo { public function doSomething() { /**code**/ return $this; } p

Re: [PHP-DEV] new feature -> with()

2007-10-10 Thread BDKR
Hartmut Holzgraefe wrote: When reading foreign C++ code a lot you learn to love the explicit nature of PHP naming scopes even though it is extra typing as it is clear at first sight whether you are looking at a variable, member variable, function, object method ... Lets do not weaken this

Re: [PHP-DEV] new feature -> with()

2007-10-10 Thread Stut
Richard Black wrote: I'm usually a lurker on here, but thought I'd through in my 2p on this one... Delphi (Object Pascal) has a similar feature, that I've had some experience of using, and I never liked it. Why? Because it only leads to confusion, mainly because the separation of object and meth

Re: [PHP-DEV] new feature -> with()

2007-10-10 Thread Hartmut Holzgraefe
Richard Black wrote: [...] for me it doesn't add any value - only potential confusion. +0.9 it makes sense as a convenience tool if used correctly but can create a hell of a maintenance nightmare if not Almost as bad as GOTO maintenance wise but without the benefits in edge cases. When readi

RE: [PHP-DEV] new feature -> with()

2007-10-10 Thread Richard Black
iginal Message- From: Sebastian [mailto:[EMAIL PROTECTED] Sent: 09 October 2007 20:12 To: internals@lists.php.net Subject: [PHP-DEV] new feature -> with() hi, i think it would be really handy to introduce the with() feature from JavaScript (and probably other OOP languages)

[PHP-DEV] new feature -> with()

2007-10-10 Thread Sebastian
hi, i think it would be really handy to introduce the with() feature from JavaScript (and probably other OOP languages) into php. so for sample the following --- $class=new class; $class->do_something(); $class->do_more(); $class->do(); --- coul