Re: [PHP-DEV] Protected methods in interfaces

2004-08-05 Thread Ferdinand Beyer
On 5 Aug 2004 at 13:59, George Schlossnagle wrote: > > Can abstract methods be protected? > > No. Why not? Look at my singleton example... -- Ferdinand Beyer <[EMAIL PROTECTED]> -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Protected methods in interfaces

2004-08-05 Thread Ferdinand Beyer
it. Why can't I instruct Singleton-classes to use protected constructors? Is this expected behavior or may I file a bug report? -- Ferdinand Beyer <[EMAIL PROTECTED]> -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: alternative syntax for do...while

2004-07-13 Thread Ferdinand Beyer
> > If you want readability, try using comments! -- Ferdinand Beyer <[EMAIL PROTECTED]> -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Use of 'self' in static function in subclass

2004-06-01 Thread Ferdinand Beyer
valuate self at runtime instead of adding a new keyword 'this'. The second one would only be confused with $this. Many people (including me) are already familiar with 'self' and expect it to refer to the class from within it is called. -- Ferdinand Beyer <[EMAIL PROTECTED]

Re: [PHP-DEV] delete in PHP

2004-06-01 Thread Ferdinand Beyer
ure not worth having if you have an > garbage collector but I can think about a few uses. There has been a heated discussion on this topic and the conclusion was to drop delete. Please search the archives for pros and cons. -- Ferdinand Beyer <[EMAIL PROTECTED]> -- PHP Internals - PH

Re: [PHP-DEV] Use of 'self' in static function in subclass

2004-06-01 Thread Ferdinand Beyer
this is indeed a problem then. -- Ferdinand Beyer <[EMAIL PROTECTED]> -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] Use of 'self' in static function in subclass

2004-06-01 Thread Ferdinand Beyer
On 1 Jun 2004 at 15:21, Stephan Schmidt wrote: > Furthermore this renders the template-method pattern quite useless, so > IMHO it should be changed. He should define an abstract method Foo::Baz() here. -- Ferdinand Beyer <[EMAIL PROTECTED]> -- PHP Internals - PHP Runtime Develop

Re: [PHP-DEV] [RFC] Type hints

2004-05-10 Thread Ferdinand Beyer
h the second. -- Ferdinand Beyer <[EMAIL PROTECTED]> -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Interface inheritance

2004-04-20 Thread Ferdinand Beyer
is that since PHP doesn't support parameter based method > dispatching, you _can't_ implement both A and B, since you can not > comply with both signature contracts simultaneously. IMO I should, using variable arguments. This is currently impossible. -- Ferdinand Beyer &l

Re: [PHP-DEV] Interface inheritance

2004-04-20 Thread Ferdinand Beyer
ameters or give them different > names. Provided that one has access to the interfaces... -- Ferdinand Beyer <[EMAIL PROTECTED]> -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Interface inheritance

2004-04-20 Thread Ferdinand Beyer
t; use it as an A object. Impl guarantees that by implementing interface A. What if Impl::doSomething() would accept exactly two parameters, but expects them to be arrays? IMO you cannot enforce this strictness with loose types... -- Ferdinand Beyer <[EMAIL PROTECTED]> -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Interface inheritance

2004-04-20 Thread Ferdinand Beyer
e two doSomething()'s } } -- Ferdinand Beyer <[EMAIL PROTECTED]> -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Interface inheritance

2004-04-19 Thread Ferdinand Beyer
ed methods. I repeat myself when I say that IMO such strictness does not fit to PHP's loose character. -- Ferdinand Beyer <[EMAIL PROTECTED]> -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: Construct Request

2004-04-15 Thread Ferdinand Beyer
array(1) { ["Not"]=> array(1) { ["Exist"]=> float(1) } } } Exactly the behavior you are looking for. Not even an E_NOTICE. -- Ferdinand Beyer <[EMAIL PROTECTED]> -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Exceptions and Errors

2004-04-12 Thread Ferdinand Beyer
lling 'Unimplemented block at xmlschemas.c:2245'. Furthermore, every validation failure is reported using PHP warnings. That's why it is impossible to use a "user-land exception thrower" with schema validation at the moment. I don't know if it is the only extension mis

Re: [PHP-DEV] Exceptions and builtin functions in PHP5

2004-04-08 Thread Ferdinand Beyer
rchives, please don't start another annoyingly > long thread about it again" ":-P" is a shortcut for "It's okay for me, it was just a stupid naïve idea, I did not know that it was already discussed in a annoyingly long thread." -- Ferdinand Beyer <[EMAIL PRO

Re: [PHP-DEV] Exceptions and builtin functions in PHP5

2004-04-08 Thread Ferdinand Beyer
On 8 Apr 2004 at 13:07, Derick Rethans wrote: > NO! > > Derick That's all, just 'NO!'? :-P Perhaps this could be done in userland by throwing an exception in a user error_handler... did not test it though... -- Ferdinand Beyer <[EMAIL PROTECTED]> -- PHP Inter

Re: [PHP-DEV] Exceptions and builtin functions in PHP5

2004-04-08 Thread Ferdinand Beyer
ng(E_ERROR); try { mysql_connect() } catch (Notice $e) { echo 'Notice: ' . $e->getMessage(); } catch (Warning $e) { echo 'Warning: ' . $e->getMessage(); } catch (Error $e) { echo 'Error: ' . $e->getMessage(); } catch (Exception $e) { echo '

Re: [PHP-DEV] protected __call() question

2004-04-05 Thread Ferdinand Beyer
... Class CallMe { public function setup() { $this->fakeMethod(); } protected function __call($method, $params) { echo 'you called CallMe::'.$method."\n"; } } -- Ferdinand Beyer <[EMAIL PROTECTED]> -- PHP Internals - PHP Runtime

Re: [PHP-DEV] protected __call() question

2004-04-05 Thread Ferdinand Beyer
On 5 Apr 2004 at 10:12, Derick Rethans wrote: > But it is not called from the outside world ... >From the class' point of view: Yes, it is. -- Ferdinand Beyer <[EMAIL PROTECTED]> -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Studlycaps and MySQLi

2004-03-28 Thread Ferdinand Beyer
r consistency and StudlyCaps. Personally I would prefer underscores but the arguments for StudlyCaps really are overwhelming. -- Ferdinand Beyer <[EMAIL PROTECTED]> -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Studlycaps and MySQLi

2004-03-27 Thread Ferdinand Beyer
e that would happen. > > That doesn't mean it's not going to happen. Try to be a little > forward-thinking. Also think about interfaces like the new iterators and exceptions which will surely replace the current PEAR error handling once PHP5 is out... -- Ferdinand Beyer <

Re: [PHP-DEV] Studlycaps and MySQLi

2004-03-23 Thread Ferdinand Beyer
What about using the old names as aliases for the new ones, triggering deprecation warnings when called? -- Ferdinand Beyer <[EMAIL PROTECTED]> -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] getInstance and new self()

2004-03-14 Thread Ferdinand Beyer
le to access overridden static functions or to instantiate the concrete class. -- Ferdinand Beyer <[EMAIL PROTECTED]> -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Declaration of Bar::__construct() must be compatible

2004-02-27 Thread Ferdinand Beyer
in an interface declaration even if it is ignored. -- Ferdinand Beyer <[EMAIL PROTECTED]> -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Declaration of Bar::__construct() must be compatible

2004-02-27 Thread Ferdinand Beyer
nce checks. Because of PHP's loose character, we cannot force the user to use the strict signature anyway. And since we have no overloading support, but var_args, strict checks make not much sense to me. -- Ferdinand Beyer <[EMAIL PROTECTED]> -- PHP Internals - PHP Runtime Developmen

Re: [PHP-DEV] Declaration of Bar::__construct() must be compatible

2004-02-26 Thread Ferdinand Beyer
sing a variable parameter count: -- Ferdinand Beyer <[EMAIL PROTECTED]> -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Calling methods of parent/ancestor classes in PHP5

2004-02-18 Thread Ferdinand Beyer
re. Don't you see a difference in the role and power of OOP in PHP and other languages like C++ or Java?! But let's get back to the thread's topic: I only said that re-assigning $this is a bad. In fact it does not even matter what language I consider to be OO... -- Ferdinand

Re: [PHP-DEV] Calling methods of parent/ancestor classes in PHP5

2004-02-18 Thread Ferdinand Beyer
provided by functions. Moreover, OOP still is expensive / slower than procedural coding. I think most people in this list (especially the core people) will agree. -- Ferdinand Beyer <[EMAIL PROTECTED]> -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: Static weirdness..

2004-02-18 Thread Ferdinand Beyer
quot;This is the Example class.\n"; } function dump() { print "This is an Example object:\n"; var_dump($this); } } But I could live without that since it would certainly be very much work to implement such a change... -- Ferdinand Beyer <[EMAIL PR

Re: [PHP-DEV] Calling methods of parent/ancestor classes in PHP5

2004-02-18 Thread Ferdinand Beyer
gt; do this for PHP4. This is not even a "feature". I think it was a bug which some guys used for dirty hacks and work arounds (Often the difference between a bug and a feature is very small). Fortunately this bug has been fixed in PHP5. -- Ferdinand Beyer <[EMAIL PROTECTED]> -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Calling methods of parent/ancestor classes in PHP5

2004-02-18 Thread Ferdinand Beyer
The feature you are asking for is not available in any OO language and it even conflicts with the OOP ideology! -- Ferdinand Beyer <[EMAIL PROTECTED]> -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] more on interface inheritance issues

2004-02-17 Thread Ferdinand Beyer
y one. I don't think there is a reasonable solution for this problem. In my opinion, the engine should allow adding parameters with default values to the old API. In your example, we should just keep the status quo. As I said before, I don't see a solution that "fits the PHP goal"

Re: [PHP-DEV] Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_default_classes.c zend_default_classes.h zend_execute.h zend_execut

2004-02-15 Thread Ferdinand Beyer
mon prefix for the identifiers but that's a different topic. -- Ferdinand Beyer <[EMAIL PROTECTED]> -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] New exceptions mechanism

2004-02-03 Thread Ferdinand Beyer
keyword to declare a method static, thus callable from outside the object context. Example: The pseudo variable $this is not available inside a method that has been declared static. ------- -- Ferdinand Beyer <[EMAIL PROTECTED]> -- PH

Re: [PHP-DEV] New exceptions mechanism

2004-02-03 Thread Ferdinand Beyer
work for foreign classes, though. -- Ferdinand Beyer <[EMAIL PROTECTED]> -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] __clone() implementation

2004-02-02 Thread Ferdinand Beyer
use names in their native language. I'm sure there will be many people complaining if this stays as it is. I still don't see the need for a fixed name... it is like forcing every exception class to have the word 'exception' in their name, just for consistency -

Re: [PHP-DEV] __clone() implementation

2004-02-02 Thread Ferdinand Beyer
ame, "that")!=0)) { zend_error(E_COMPILE_ERROR, "The clone method must be declared as __clone($that)"); [...] Why shouldn't I be able to name it as I want, e.g. $clone? Don't understand the reason for that... -- Ferdinand Beyer <[EMAIL PROTECTE

Re: [PHP-DEV] __clone() implementation

2004-02-02 Thread Ferdinand Beyer
t no one was interested (0 feedback). But now that it will be included I'm very happy! -- Ferdinand Beyer <[EMAIL PROTECTED]> -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] SimpleXML Docs

2004-01-23 Thread Ferdinand Beyer
the notice: "This function is currently not documented; only the argument list is available", although a documentation exists. -- Ferdinand Beyer <[EMAIL PROTECTED]> -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Naming convention for build-in classes and interfaces

2003-11-30 Thread Ferdinand Beyer
g __get(), __set() and __call() Maybe there is a better prefix than "php" to strictly separate Zend Engine from PHP. Examples are "zend_xxx", "zxxx" or "__xxx". -- Ferdinand Beyer <[EMAIL PROTECTED]> -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] E_STRICT

2003-11-19 Thread Ferdinand Beyer
ence between E_NOTICE and E_STRICT then? It would be as easy to trigger errors like "Notice: Use of deprecated function `is_a`; use `instanceof` instead" Purists who want to be sure to be coding >The PHP Way< will use error_level = E_ALL anyway... -- Ferdinand Beyer <[EMAIL P

RE: [PHP-DEV] differences in the RDBMS ext API's

2003-09-25 Thread Ferdinand Beyer
r extension developers as well as OO (like PEAR::DB) and procedural (like mysql ext) PHP APIs. Just my two cents -- Ferdinand Beyer <[EMAIL PROTECTED]> -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php