I am using PHP, but I guess this question might be language agnostic.
With PHP, a constant is defined by PHP, called DIRECTORY_SEPARATO
R. I have seen this in Joomla
define('DS', DIRECTORY_SEPARATOR); // quicker to type plus DS is easier to read in a path
I thought this looked like a good idea so I incorporated it into some of my sites. Now I'm asking myself why. I have only experience on Windows and OS X (One day Linux...) and from what I know Microsoft, Linux and Apple all use the forward slash as the directory separator.
I know it might help if one day someone changes the directory separator, but that's unlikely in the foreseeable future (at least I think so).
Is using this constant unnecessary?