[dmd-beta] D 1.074 and 2.059 betas

Jonathan M Davis jmdavisProg at gmx.com
Mon Apr 2 10:09:56 PDT 2012


On Monday, April 02, 2012 18:51:50 Andrej Mitrovic wrote:
> On 4/2/12, Walter Bright <walter at digitalmars.com> wrote:
> > http://ftp.digitalmars.com/dmd2beta.zip
> 
> curdir and pardir have been deprecated on the basis that "." and ".."
> are used for these on all platforms. However I've noticed something in
> Python, this is in Lib\macpath.py:
> 
> # strings representing various path-related bits and pieces
> curdir = ':'
> pardir = '::'
> 
> So it seems there is a use-case for keeping curdir/pardir in Phobos
> and the above should probably be added. Another little use-case is
> that removing these breaks user-code for no reason other than saving
> two lines of code in Phobos.

That decision was made months ago during the review of the new std.path, and I 
could have remembered the reasoning wrong. But curdir and pardir would have 
been going away as part of the std.path changes regardless, because they're 
not properly camelcased. So, it's only a question of whether it would have 
meant changing curdir and pardir to "." and ".." or to something like
currentDir and parentDir. User code would have had to change either way.

- Jonathan M Davis


More information about the dmd-beta mailing list