Re: Line breaks on long class::method names.
| From: | Levi Morrison | Date: | Tue, 08 Jan 2013 17:45:45 +0000 |
| Subject: | Re: Line breaks on long class::method names. | ||
| References: | 1 2 3 4 5 6 7 8 9 | Groups: | php.webmaster |
| Request: | Send a blank email to php-webmaster+get-15251@lists.php.net to get a copy of this message | ||
On Tue, Jan 8, 2013 at 10:35 AM, Peter Cowburn <salathe@php.net> wrote:
> On 8 January 2013 16:34, Paul Dragoonis <dragoonis@gmail.com> wrote:
>> I was under the impression those were static methods, then we should
>> DEFINITELY get rid of this crappy class prefix on the left. Wether it's
>> nice or not from a UI standpoint, it's fundamentally broken and misleading
>> and should be removed from there, not even considering design things.
>>
>> I'm going to make this patch, if someone can come up with a good reason to
>> mislead people, speak up and we can revert the commit.
>
> I don't have a *good* reason, more a vague niggling doubt. I think
> the assumption that "everyone" (not to quote anybody) trips over ::
> and assumes they are all static methods is not going to carry much
> weight. Either way, who's to say that getting rid of the class name
> entirely won't raise another issue: people will assume they're
> functions rather than class methods!
>
> I have to say, occasionally people read the function prototypes and
> try to use ClassName::method() mistakenly but I have never seen or
> heard of anyone confused about the navigation link titles (until
> today).
>
> Removing the class name disassociates the method from what it belongs
> to. That hurts my brain. Please, don't get rid of the classes.
>
> P.S. Didn't we fix this with some CSS magic at some point, rather than
> injecting HTML? Maybe I imagined that or it's buried someone in my
> local checkout.
>
> P.P.S. I'm too late. Darn.
Perhaps simply leaving the
:: would help distinguish them as class
methods vs normal functions without the bloat of the full-on class
name?