Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » PHP
  • » [PHP-DEV] solution to the "Date" issue [RSS Feed]

#1 Nov. 26, 2005 00:33:03

Greg B.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[PHP-DEV] solution to the "Date" issue


Hi,

I would like to propose these simple steps be taken:

1) rename "date" to "PHP_Date"
2) reserve the "PHP_" prefix for all future core classes in PHP 5 (if any)
3) when namespaces become available, reserve "PHP" for all future
internal classes

Greg

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit:http://www.php.net/unsub.php

Offline

#2 Nov. 26, 2005 00:53:04

Ken T.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[PHP-DEV] solution to the "Date" issue


Not to start a flame war, but...

How about STD, Std, or something similar? It certainly works for... that
language... that has multiple implementations of the standard classes.
It can't hurt to play to people's comfort when the change doesn't really
affect PHP in any major way. :)

But yes, a standard class prefix (to be migrated to a namespace) sounds
more practical than either asking everyone to use prefixes or hoping
that the minimal user base is affected by a conflict.

And getting everyone into a habit of importing standard php classes --

class Date extends PHP_Date {}

-- might help in the future. :D

Ken

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit:http://www.php.net/unsub.php

Offline

#3 Nov. 26, 2005 01:02:31

Robert C.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[PHP-DEV] solution to the "Date" issue


On Fri, 2005-11-25 at 20:07, Ken Tossell wrote:
> Not to start a flame war, but...
>
> How about STD, Std, or something similar? It certainly works for... that
> language... that has multiple implementations of the standard classes.
> It can't hurt to play to people's comfort when the change doesn't really
> affect PHP in any major way. :)
>
> But yes, a standard class prefix (to be migrated to a namespace) sounds
> more practical than either asking everyone to use prefixes or hoping
> that the minimal user base is affected by a conflict.
>
> And getting everyone into a habit of importing standard php classes --
>
> class Date extends PHP_Date {}

Maybe go with proper CamelCase:

class Date extends PhpDate{}

:)

Cheers,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework -http://www.interjinn.com|
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit:http://www.php.net/unsub.php

Offline

#4 Nov. 26, 2005 08:21:41

Stefan W.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[PHP-DEV] solution to the "Date" issue


On 26/11/05, Robert Cummings <> wrote:
> On Fri, 2005-11-25 at 20:07, Ken Tossell wrote:
> > Not to start a flame war, but...
> >
> > How about STD, Std, or something similar? It certainly works for... that
> > language... that has multiple implementations of the standard classes.
> > It can't hurt to play to people's comfort when the change doesn't really
> > affect PHP in any major way. :)
> >
> > But yes, a standard class prefix (to be migrated to a namespace) sounds
> > more practical than either asking everyone to use prefixes or hoping
> > that the minimal user base is affected by a conflict.
> >
> > And getting everyone into a habit of importing standard php classes --
> >
> > class Date extends PHP_Date {}
>
> Maybe go with proper CamelCase:
>
> class Date extends PhpDate{}
>
> :)

This violates the coding standards for class names. Words have to be
separated by underscores.

Regards,
Stefan

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit:http://www.php.net/unsub.php

Offline

#5 Nov. 26, 2005 12:30:11

Marcus B.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[PHP-DEV] solution to the "Date" issue


Hello Stefan,

Saturday, November 26, 2005, 9:21:07 AM, you wrote:

> On 26/11/05, Robert Cummings <> wrote:
>> On Fri, 2005-11-25 at 20:07, Ken Tossell wrote:
>> > Not to start a flame war, but...
>> >
>> > How about STD, Std, or something similar? It certainly works for... that
>> > language... that has multiple implementations of the standard classes.
>> > It can't hurt to play to people's comfort when the change doesn't really
>> > affect PHP in any major way. :)
>> >
>> > But yes, a standard class prefix (to be migrated to a namespace) sounds
>> > more practical than either asking everyone to use prefixes or hoping
>> > that the minimal user base is affected by a conflict.
>> >
>> > And getting everyone into a habit of importing standard php classes --
>> >
>> > class Date extends PHP_Date {}
>>
>> Maybe go with proper CamelCase:
>>
>> class Date extends PhpDate{}
>>
>> :)

> This violates the coding standards for class names. Words have to be
> separated by underscores.

Mhhh noone updated the coding standards once we changed then before 5 was
released. Right now only the __PHP_Incomplete_Class and php_user_filter
plus ext MysqlI is ignoring them. The former could not be changed since
there is valid code out and MysqlI not adhering to the standards caused
an endless discussion...:
/usr/src/php-cvs $ php -r
'print_r(get_declared_classes());'|grep _
=> __PHP_Incomplete_Class
=> php_user_filter
=> mysqli_sql_exception
=> mysqli_driver
=> mysqli_warning
=> mysqli_result
=> mysqli_stmt

> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit:http://www.php.net/unsub.phpBest regards,
Marcus

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit:http://www.php.net/unsub.php

Offline

  • Root
  • » PHP
  • » [PHP-DEV] solution to the "Date" issue [RSS Feed]

Board footer

Moderator control

Enjoy the 22nd of January
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support