The issue I see with this is consistency. I would rather have it be
consistent across all the code rather than having exceptions to coding
standard rules. Since some cases will not work if you don't use it. This
will result in little bugs in windows that will go un-noticed until a win
user reports it.
- Jon
On Mon, Sep 29, 2008 at 10:48 AM, Kris Wallsmith <
[EMAIL PROTECTED]> wrote:
> Hi James,
>
> Yes, the DIRECTORY_SEPARATOR constant exists for the purpose of file
> system compatibility, but it's use is only warranted in certain
> circumstances. For example, the following code will work in both Unix and
> Windows environments...
>
> <?php include dirname(__FILE__).'/some/other/file.php'; ?>
>
> While the following code is only compatible with Unix...
>
> <?php if ('/' == dirname(__FILE__)) echo 'foo'; ?>
>
> I'm suggesting those unwarranted uses of the constant be removed and coding
> standards updated to improve the readability of the codebase. Windows
> compatibility would not be affected.
>
> Kris
>
> On Sep 29, 2008, at 7:41 AM, James <[EMAIL PROTECTED]> wrote:
>
> -1
>
> In order to support windows you need to have the right directory separator.
> I am not a windows user, but so no reason why we shouldn't support it.
>
> James
>
>
> On Sep 29, 2008, at 6:35 AM, Ian Christian wrote:
>
>
> 2008/9/26 Kris Wallsmith < <[EMAIL PROTECTED]>
> [EMAIL PROTECTED]>:
>
> Can we update coding standards to specify use the the '/' literal
>
> rather than DIRECTORY_SEPARATOR? This would make for better
>
> readability.
>
>
> +1
>
>
>
>
>
>
>
> >
>
--
Jonathan H. Wage
Open Source Software Developer & Evangelist
http://www.jwage.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en
-~----------~----~----~----~------~----~------~--~---