[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-gtk-dev
Subject:    [PHP-GTK-DEV] Re: Enums, flags and ::
From:       Andrei Zmievski <andrei () gravitonic ! com>
Date:       2005-10-25 17:56:09
Message-ID: 43eec39573ba832e6bb365a8e167f3c8 () gravitonic ! com
[Download RAW message or body]

On Oct 25, 2005, at 8:50 AM, Steph Fox wrote:

> Before it's too late (assuming it isn't already): Is there any way we 
> can
> return enums/flags to the standard GTK format, as they were in PHP-GTK 
> 1?
>
> If you remember that far back, I spent more than a day trying to work 
> out
> what I was doing wrong when every enum in sight failed in an old 
> script I
> upgraded to PHP-GTK 2.  I don't think I'm going to be the only 
> scriptkiddie
> baffled by that change.
>
> It's also the one area Christian and I can't come to an agreement over 
> in
> our coding standards discussions, because what _should_ be a constant 
> is
> being treated as some kind of a pseudo-method, which makes either 
> approach
> inconsistent by definition.

Huh, what pseudo-method? It's a class constant, that's all.

> I know it'd be a BC breakage for PHP-GTK 2 to change this now, but then
> again we haven't released v. 2 yet.  At present it's a BC breakage for
> PHP-GTK 1, which is probably more serious.
>
> So the question is, do enums and flags _have_ to be registered as class
> entry constants for ZE 2 to deal with them?  Or is it just a matter of
> convenience?

It's a matter of not polluting global namespace.

> - and the next question is, assuming it's possible to register them as
> global constants, should we?

I don't think so.

-Andrei

-- 
PHP-GTK Development Mailing List (http://gtk.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic