Re: Next in Review Queue: The New std.path

2011-07-20 Thread Lars T. Kyllingstad
On Mon, 18 Jul 2011 16:48:29 +, Ellery Newcomer wrote: Looks nice. a thought: alternate data streams are fringe and probably don't warrant support (you might look into them), but windows \\?\ paths probably should be supported in eg joinPath and pathSplitter I'll look into it. :)

Re: Next in Review Queue: The New std.path

2011-07-20 Thread Lars T. Kyllingstad
On Mon, 18 Jul 2011 20:47:20 +0200, torhu wrote: I didn't suggest joinPaths, because the inputs are not always paths, generally you join things like a path to a directory together with just a filename. Maybe it's ok to call it all just 'paths', I don't know. But the output is commonly a

Re: Next in Review Queue: The New std.path

2011-07-18 Thread Lars T. Kyllingstad
On Sun, 17 Jul 2011 12:30:39 +0200, torhu wrote: On 15.07.2011 02:20, dsimcha wrote: Lars Kyllingstad's new and improved std.path module for Phobos is the next item up in the review queue. I've volunteered to be the review manager. Barring any objections, the review starts now and ends at

Re: Next in Review Queue: The New std.path

2011-07-18 Thread Steven Schveighoffer
On Fri, 15 Jul 2011 16:15:23 -0400, Nick Sabalausky a@a.a wrote: Steven Schveighoffer schvei...@yahoo.com wrote in message news:op.vyoeirtveav7ka@localhost.localdomain... On Fri, 15 Jul 2011 15:21:49 -0400, Nick Sabalausky a@a.a wrote: Actually, if Windows did have one single equivalent to

Re: Next in Review Queue: The New std.path

2011-07-18 Thread David Nadlinger
On 7/18/11 3:55 PM, Steven Schveighoffer wrote: In other words, expand more than just the tilde. My thoughts are, if we try and take a stab at making something intelligently decide where to store files, people will appreciate it more than having to search the web for a right answer to something

Re: Next in Review Queue: The New std.path

2011-07-18 Thread Steven Schveighoffer
On Mon, 18 Jul 2011 09:16:35 -0400, Lars T. Kyllingstad public@kyllingen.nospamnet wrote: On Sun, 17 Jul 2011 12:30:39 +0200, torhu wrote: On 15.07.2011 02:20, dsimcha wrote: Lars Kyllingstad's new and improved std.path module for Phobos is the next item up in the review queue. I've

Re: Next in Review Queue: The New std.path

2011-07-18 Thread Lars T. Kyllingstad
On Mon, 18 Jul 2011 10:04:26 -0400, Steven Schveighoffer wrote: On Mon, 18 Jul 2011 09:16:35 -0400, Lars T. Kyllingstad public@kyllingen.nospamnet wrote: On Sun, 17 Jul 2011 12:30:39 +0200, torhu wrote: On 15.07.2011 02:20, dsimcha wrote: Lars Kyllingstad's new and improved std.path

Re: Next in Review Queue: The New std.path

2011-07-18 Thread Daniel Murphy
Lars T. Kyllingstad public@kyllingen.NOSPAMnet wrote in message news:j01h2f$2ia$2...@digitalmars.com... The specific cases in question are templated functions, where I don't know whether the array is immutable unless I specifically test it. I simply used arr.idup, assuming the compiler would

Re: Next in Review Queue: The New std.path

2011-07-18 Thread Lars T. Kyllingstad
On Tue, 19 Jul 2011 00:57:44 +1000, Daniel Murphy wrote: Lars T. Kyllingstad public@kyllingen.NOSPAMnet wrote in message news:j01h2f$2ia$2...@digitalmars.com... The specific cases in question are templated functions, where I don't know whether the array is immutable unless I specifically test

Re: Next in Review Queue: The New std.path

2011-07-18 Thread Ellery Newcomer
Looks nice. a thought: alternate data streams are fringe and probably don't warrant support (you might look into them), but windows \\?\ paths probably should be supported in eg joinPath and pathSplitter

Re: Next in Review Queue: The New std.path

2011-07-18 Thread Jonathan M Davis
On 2011-07-18 08:08, Lars T. Kyllingstad wrote: On Tue, 19 Jul 2011 00:57:44 +1000, Daniel Murphy wrote: Lars T. Kyllingstad public@kyllingen.NOSPAMnet wrote in message news:j01h2f$2ia$2...@digitalmars.com... The specific cases in question are templated functions, where I don't know

Re: Next in Review Queue: The New std.path

2011-07-18 Thread torhu
On 18.07.2011 15:55, Steven Schveighoffer wrote: ... Certainly not having that function on Windows will encourage them to choose a wrong choice then, no? I mean if they want to find a home directory and phobos doesn't support that, then they google online, find something like %userprofile%, use

Re: Next in Review Queue: The New std.path

2011-07-18 Thread torhu
On 18.07.2011 15:16, Lars T. Kyllingstad wrote: On Sun, 17 Jul 2011 12:30:39 +0200, torhu wrote: ... joinPath also uses .idup, thus always allocates. Maybe there could be a documented allocation policy for the module as a whole? Copy-on-write used to be the general rule for Phobos, don't

Re: Next in Review Queue: The New std.path

2011-07-18 Thread Steven Schveighoffer
On Mon, 18 Jul 2011 14:29:08 -0400, torhu no@spam.invalid wrote: On 18.07.2011 15:55, Steven Schveighoffer wrote: ... Certainly not having that function on Windows will encourage them to choose a wrong choice then, no? I mean if they want to find a home directory and phobos doesn't support

Re: Next in Review Queue: The New std.path

2011-07-17 Thread torhu
On 15.07.2011 02:20, dsimcha wrote: Lars Kyllingstad's new and improved std.path module for Phobos is the next item up in the review queue. I've volunteered to be the review manager. Barring any objections, the review starts now and ends at the ends two weeks from now on July 28. This will be

Re: Next in Review Queue: The New std.path

2011-07-17 Thread Lars T. Kyllingstad
On Sat, 16 Jul 2011 14:25:36 -0700, Jonathan M Davis wrote: There's no such thing as an OutOfMemoryException. It's an OutOfMemoryError. And being an error, I don't think that there's any need to mention it in the documentation. _Anything_ which allocates memory could cause the application

Re: Next in Review Queue: The New std.path

2011-07-17 Thread Lars T. Kyllingstad
On Sat, 16 Jul 2011 14:25:36 -0700, Jonathan M Davis wrote: There's no such thing as an OutOfMemoryException. It's an OutOfMemoryError. And being an error, I don't think that there's any need to mention it in the documentation. _Anything_ which allocates memory could cause the application

Re: Next in Review Queue: The New std.path

2011-07-17 Thread Lars T. Kyllingstad
On Sat, 16 Jul 2011 14:25:36 -0700, Jonathan M Davis wrote: There's no such thing as an OutOfMemoryException. It's an OutOfMemoryError. And being an error, I don't think that there's any need to mention it in the documentation. _Anything_ which allocates memory could cause the application

Re: Next in Review Queue: The New std.path

2011-07-17 Thread Lars T. Kyllingstad
On Sat, 16 Jul 2011 14:25:36 -0700, Jonathan M Davis wrote: There's no such thing as an OutOfMemoryException. It's an OutOfMemoryError. And being an error, I don't think that there's any need to mention it in the documentation. _Anything_ which allocates memory could cause the application

Re: Next in Review Queue: The New std.path

2011-07-16 Thread Andrej Mitrovic
I was quite fond of it being renamed to joinPath, because when I'm doing string processing on paths I import both std.algorithm/std.array and std.path, and so far I've always had conflicts with join() functions.

Re: Next in Review Queue: The New std.path

2011-07-16 Thread Lars T. Kyllingstad
On Fri, 15 Jul 2011 20:08:03 -0700, Jonathan M Davis wrote: Names --- dirSeparator: I'd love to see this as something much shorter like dirSep. I think that dirSeparator is overly long - particularly for something which is likely to be used primarily in longer expressions.

Re: Next in Review Queue: The New std.path

2011-07-16 Thread Jonathan M Davis
On Saturday 16 July 2011 19:39:13 Lars T. Kyllingstad wrote: On Fri, 15 Jul 2011 20:08:03 -0700, Jonathan M Davis wrote: Names --- dirSeparator: I'd love to see this as something much shorter like dirSep. I think that dirSeparator is overly long - particularly for something

Re: Next in Review Queue: The New std.path

2011-07-15 Thread KennyTM~
On Jul 15, 11 10:22, bearophile wrote: dsimcha: Author's comments -- please read before reviewing: Thirdly, I have applied @safe, pure and nothrow wherever possible. There were cases where this was not possible, either due to bugs in DMD (specifically, 5304, 5700 and 5798) or due to

Re: Next in Review Queue: The New std.path

2011-07-15 Thread KennyTM~
IANAL, but there should be mention of the Boost license somewhere. ssize_t (Line 50): Why not use sizediff_t? Line 58..67: I think version blocks should be like version (Windows) { ... } else version (Posix) { ... } else static assert(0,

Re: Next in Review Queue: The New std.path

2011-07-15 Thread Nick Sabalausky
dsimcha dsim...@yahoo.com wrote in message news:ivo271$1fu0$1...@digitalmars.com... 3. All the stuff from the old std.path should be scheduled for deprecation. Deprecating stuff breaks people's build processes and should only be done after adequate warning. I don't know a good way to

Re: Next in Review Queue: The New std.path

2011-07-15 Thread Nick Sabalausky
Andrej Mitrovic andrej.mitrov...@gmail.com wrote in message news:mailman.1654.1310690711.14074.digitalmar...@puremagic.com... All functions have nice names except fcmp, why the abbreviation? Is expandTilde supposed to work on Windows? I've never seen tilde used there. The docs say that it

Re: Next in Review Queue: The New std.path

2011-07-15 Thread Nick Sabalausky
KennyTM~ kenn...@gmail.com wrote in message news:ivosru$2v11$1...@digitalmars.com... pathCharMatch: On OS X the file system is case-insensitive by default. Also, I'm not sure if restricting to ASCII is fine. Actually the case-sensitivity is independent of the platform, e.g. you can

Re: Next in Review Queue: The New std.path

2011-07-15 Thread Jonathan M Davis
On Friday 15 July 2011 04:13:35 Nick Sabalausky wrote: dsimcha dsim...@yahoo.com wrote in message news:ivo271$1fu0$1...@digitalmars.com... 3. All the stuff from the old std.path should be scheduled for deprecation. Deprecating stuff breaks people's build processes and should only be

Re: Next in Review Queue: The New std.path

2011-07-15 Thread Nick Sabalausky
dsimcha dsim...@yahoo.com wrote in message news:ivo1ef$1ero$1...@digitalmars.com... Lars Kyllingstad's new and improved std.path module for Phobos is the next item up in the review queue. Yay! First of all, very well-written docs :) My notes: - For clarity and completeness, the docs for

Re: Next in Review Queue: The New std.path

2011-07-15 Thread Nick Sabalausky
Since the details of many of these functions have changed, is it really a good idea to make the depricated names aliases of the new functions? If anyone has code that relies on the screwy old behavior (such as trying to compensate for their problems) then that code will silently break.

Re: Next in Review Queue: The New std.path

2011-07-15 Thread Jonathan M Davis
On Friday 15 July 2011 04:38:35 Nick Sabalausky wrote: Since the details of many of these functions have changed, is it really a good idea to make the depricated names aliases of the new functions? If anyone has code that relies on the screwy old behavior (such as trying to compensate for

Re: Next in Review Queue: The New std.path

2011-07-15 Thread Mafi
Am 15.07.2011 10:22, schrieb Nick Sabalausky: Andrej Mitrovicandrej.mitrov...@gmail.com wrote in message news:mailman.1654.1310690711.14074.digitalmar...@puremagic.com... All functions have nice names except fcmp, why the abbreviation? Is expandTilde supposed to work on Windows? I've never

Re: Next in Review Queue: The New std.path

2011-07-15 Thread Vladimir Panteleev
On Fri, 15 Jul 2011 03:20:13 +0300, dsimcha dsim...@yahoo.com wrote: Lars Kyllingstad's new and improved std.path module for Phobos is the next item up in the review queue. Three notes: 1. No tests for extension(foo) is null extension(foo.) !is null 2. absolutePath's signature could be

Re: Next in Review Queue: The New std.path

2011-07-15 Thread Andrej Mitrovic
On 7/15/11, Vladimir Panteleev vladi...@thecybershadow.net wrote: 2. absolutePath's signature could be changed to string absolutePath(string path, string base = getcwd()) for more flexibility at no penalty +1.

Re: Next in Review Queue: The New std.path

2011-07-15 Thread Lars T. Kyllingstad
On Thu, 14 Jul 2011 20:33:20 -0400, dsimcha wrote: ...And now I'll do the honors and be the first to review. Overall this looks solid and well documented but I have a few nitpicks and questions 1. Do we really need currentDirSymbol and parentDirSymbol? AFAIK they're standard across all

Re: Next in Review Queue: The New std.path

2011-07-15 Thread Jacob Carlborg
On 2011-07-15 10:08, KennyTM~ wrote: IANAL, but there should be mention of the Boost license somewhere. ssize_t (Line 50): Why not use sizediff_t? Line 58..67: I think version blocks should be like version (Windows) { ... } else version (Posix) { ... } else static assert(0, unsupported

Re: Next in Review Queue: The New std.path

2011-07-15 Thread Lars T. Kyllingstad
On Fri, 15 Jul 2011 02:35:02 +0200, Andrej Mitrovic wrote: Lars, is normalize basically that feature request (toNativePath) I asked for? It does seem to do more than that though. Oops, sorry. Because your feature request came in on a different channel than the others (my GitHub inbox), I

Re: Next in Review Queue: The New std.path

2011-07-15 Thread Lars T. Kyllingstad
On Fri, 15 Jul 2011 02:45:02 +0200, Andrej Mitrovic wrote: All functions have nice names except fcmp, why the abbreviation? For consistency with std.algorithm.cmp and std.string.icmp, on which it is based. I'd be open for other suggestions if people think it should be changed. Is

Re: Next in Review Queue: The New std.path

2011-07-15 Thread Andrej Mitrovic
The thing although Windows works with forward slashes some tools might not work with forward slashes, so toNativePath could be useful there. Then again for example GIT doesn't work with backward slashes (at least .gitignore doesn't want to work with it). So maybe it should have an optional

Re: Next in Review Queue: The New std.path

2011-07-15 Thread Andrej Mitrovic
The thing is*

Re: Next in Review Queue: The New std.path

2011-07-15 Thread Lars T. Kyllingstad
On Fri, 15 Jul 2011 14:12:55 +0200, Mafi wrote: What about longname becoming longna~1 on dos/emulators etc. Expanding this back needs information about the actual state of the file system so I don't now if such a function belongs to std.path but a longname.png = longna~1.png belongs IMO to

Re: Next in Review Queue: The New std.path

2011-07-15 Thread Lars T. Kyllingstad
On Thu, 14 Jul 2011 21:00:26 -0400, bearophile wrote: Just few comments to the source code. I have not used it yet. version (Windows) private alias Signed!size_t ssize_t; Why not just ptrdiff_t ? I find ssize_t (which is standard on POSIX) to be much more descriptive of its purpose.

Re: Next in Review Queue: The New std.path

2011-07-15 Thread Lars T. Kyllingstad
On Fri, 15 Jul 2011 16:08:37 +0800, KennyTM~ wrote: IANAL, but there should be mention of the Boost license somewhere. Oops, seems I forgot. ssize_t (Line 50): Why not use sizediff_t? Mainly because I wasn't aware of its existence. ;) I'll fix. (I still think ssize_t is a better name,

Re: Next in Review Queue: The New std.path

2011-07-15 Thread KennyTM~
On Jul 15, 11 23:26, Lars T. Kyllingstad wrote: So here you have had to use Unqual immutable(Unqual!C1)[] setExtension(C1, C2)(in C1[] path, in C2[] ext) immutable(Unqual!C1)[] defaultExtension(C1, C2)(in C1[] path, in C2[] ext) Instead of Unqual isn't it nicer to use a Deconst!()

Re: Next in Review Queue: The New std.path

2011-07-15 Thread Lars T. Kyllingstad
On Fri, 15 Jul 2011 04:33:34 -0400, Nick Sabalausky wrote: dsimcha dsim...@yahoo.com wrote in message news:ivo1ef$1ero$1...@digitalmars.com... Lars Kyllingstad's new and improved std.path module for Phobos is the next item up in the review queue. Yay! First of all, very well-written

Re: Next in Review Queue: The New std.path

2011-07-15 Thread Lars T. Kyllingstad
On Fri, 15 Jul 2011 01:55:18 -0700, Jonathan M Davis wrote: On Friday 15 July 2011 04:38:35 Nick Sabalausky wrote: Since the details of many of these functions have changed, is it really a good idea to make the depricated names aliases of the new functions? If anyone has code that relies on

Re: Next in Review Queue: The New std.path

2011-07-15 Thread Lars T. Kyllingstad
On Fri, 15 Jul 2011 17:15:25 +0300, Vladimir Panteleev wrote: On Fri, 15 Jul 2011 03:20:13 +0300, dsimcha dsim...@yahoo.com wrote: Lars Kyllingstad's new and improved std.path module for Phobos is the next item up in the review queue. Three notes: 1. No tests for extension(foo) is null

Re: Next in Review Queue: The New std.path

2011-07-15 Thread Jonathan M Davis
On Friday 15 July 2011 23:48:39 KennyTM~ wrote: On Jul 15, 11 23:26, Lars T. Kyllingstad wrote: So here you have had to use Unqual immutable(Unqual!C1)[] setExtension(C1, C2)(in C1[] path, in C2[] ext) immutable(Unqual!C1)[] defaultExtension(C1, C2)(in C1[] path, in C2[] ext)

Re: Next in Review Queue: The New std.path

2011-07-15 Thread KennyTM~
On Jul 16, 11 00:05, Jonathan M Davis wrote: On Friday 15 July 2011 23:48:39 KennyTM~ wrote: On Jul 15, 11 23:26, Lars T. Kyllingstad wrote: So here you have had to use Unqual immutable(Unqual!C1)[] setExtension(C1, C2)(in C1[] path, in C2[] ext) immutable(Unqual!C1)[]

Re: Next in Review Queue: The New std.path

2011-07-15 Thread Vladimir Panteleev
On Fri, 15 Jul 2011 18:55:58 +0300, Lars T. Kyllingstad public@kyllingen.nospamnet wrote: 3. There are infinitely many possibilities for a relative path The shortest version is most useful. The idea is to do this: 1) find a common root (if none exists, return input absolute path as is)

Re: Next in Review Queue: The New std.path

2011-07-15 Thread Nick Sabalausky
Lars T. Kyllingstad public@kyllingen.NOSPAMnet wrote in message news:ivpl34$gf5$3...@digitalmars.com... On Fri, 15 Jul 2011 02:45:02 +0200, Andrej Mitrovic wrote: All functions have nice names except fcmp, why the abbreviation? For consistency with std.algorithm.cmp and std.string.icmp, on

Re: Next in Review Queue: The New std.path

2011-07-15 Thread Nick Sabalausky
Lars T. Kyllingstad public@kyllingen.NOSPAMnet wrote in message news:ivpnr5$gf5$7...@digitalmars.com... On Fri, 15 Jul 2011 04:33:34 -0400, Nick Sabalausky wrote: - Maybe there should be a function canonical() that resolves symbolic links, runs absolutePath() and normalize(), and on Windows

Re: Next in Review Queue: The New std.path

2011-07-15 Thread Nick Sabalausky
Vladimir Panteleev vladi...@thecybershadow.net wrote in message news:op.vyny7zfetuz...@cybershadow.mshome.net... On Fri, 15 Jul 2011 03:20:13 +0300, dsimcha dsim...@yahoo.com wrote: Lars Kyllingstad's new and improved std.path module for Phobos is the next item up in the review queue.

Re: Next in Review Queue: The New std.path

2011-07-15 Thread Steven Schveighoffer
On Fri, 15 Jul 2011 15:21:49 -0400, Nick Sabalausky a@a.a wrote: Lars T. Kyllingstad public@kyllingen.NOSPAMnet wrote in message news:ivpl34$gf5$3...@digitalmars.com... On Fri, 15 Jul 2011 02:45:02 +0200, Andrej Mitrovic wrote: All functions have nice names except fcmp, why the abbreviation?

Re: Next in Review Queue: The New std.path

2011-07-15 Thread Andrej Mitrovic
On 7/15/11, Nick Sabalausky a@a.a wrote: Actually, if Windows did have one single equivalent to /home/{user}, then I think it would be absolutely fantastic to make tilde mean home directory on Windows. But as things are, that's a moot point, of course. %UserProfile%

Re: Next in Review Queue: The New std.path

2011-07-15 Thread Andrej Mitrovic
Also, you can change the location of your home directory, although it's not recommended since some applications like to hardwire directories.UserProfile should reflect the changes though.

Re: Next in Review Queue: The New std.path

2011-07-15 Thread Nick Sabalausky
Lars T. Kyllingstad public@kyllingen.NOSPAMnet wrote in message news:ivpk4e$gf5$1...@digitalmars.com... 4. This module might be useful at compile time. As pointed out on this forum, Phobos should eventually include tests for CTFE-ability. It would be nice if std.path had a few CTFE unit

Re: Next in Review Queue: The New std.path

2011-07-15 Thread Lars T. Kyllingstad
On Fri, 15 Jul 2011 15:34:37 -0400, Nick Sabalausky wrote: Lars T. Kyllingstad public@kyllingen.NOSPAMnet wrote in message news:ivpnr5$gf5$7...@digitalmars.com... On Fri, 15 Jul 2011 04:33:34 -0400, Nick Sabalausky wrote: - Maybe there should be a function canonical() that resolves symbolic

Re: Next in Review Queue: The New std.path

2011-07-15 Thread Lars T. Kyllingstad
On Sat, 16 Jul 2011 00:17:03 +0800, KennyTM~ wrote: On Jul 16, 11 00:05, Jonathan M Davis wrote: On Friday 15 July 2011 23:48:39 KennyTM~ wrote: On Jul 15, 11 23:26, Lars T. Kyllingstad wrote: So here you have had to use Unqual immutable(Unqual!C1)[] setExtension(C1, C2)(in C1[] path, in

Re: Next in Review Queue: The New std.path

2011-07-15 Thread Nick Sabalausky
Steven Schveighoffer schvei...@yahoo.com wrote in message news:op.vyoeirtveav7ka@localhost.localdomain... On Fri, 15 Jul 2011 15:21:49 -0400, Nick Sabalausky a@a.a wrote: Actually, if Windows did have one single equivalent to /home/{user}, then I think it would be absolutely fantastic to

Re: Next in Review Queue: The New std.path

2011-07-15 Thread Lars T. Kyllingstad
On Fri, 15 Jul 2011 19:47:04 +0300, Vladimir Panteleev wrote: On Fri, 15 Jul 2011 18:55:58 +0300, Lars T. Kyllingstad public@kyllingen.nospamnet wrote: 3. There are infinitely many possibilities for a relative path The shortest version is most useful. The idea is to do this: 1) find a

Re: Next in Review Queue: The New std.path

2011-07-15 Thread KennyTM~
On Jul 16, 11 04:16, Lars T. Kyllingstad wrote: On Sat, 16 Jul 2011 00:17:03 +0800, KennyTM~ wrote: On Jul 16, 11 00:05, Jonathan M Davis wrote: On Friday 15 July 2011 23:48:39 KennyTM~ wrote: On Jul 15, 11 23:26, Lars T. Kyllingstad wrote: So here you have had to use Unqual

Re: Next in Review Queue: The New std.path

2011-07-15 Thread Lars T. Kyllingstad
On Fri, 15 Jul 2011 15:42:50 -0400, Nick Sabalausky wrote: Vladimir Panteleev vladi...@thecybershadow.net wrote in message news:op.vyny7zfetuz...@cybershadow.mshome.net... On Fri, 15 Jul 2011 03:20:13 +0300, dsimcha dsim...@yahoo.com wrote: Lars Kyllingstad's new and improved std.path module

Re: Next in Review Queue: The New std.path

2011-07-15 Thread Lars T. Kyllingstad
On Fri, 15 Jul 2011 15:57:58 -0400, Nick Sabalausky wrote: Lars T. Kyllingstad public@kyllingen.NOSPAMnet wrote in message news:ivpk4e$gf5$1...@digitalmars.com... 4. This module might be useful at compile time. As pointed out on this forum, Phobos should eventually include tests for

Re: Next in Review Queue: The New std.path

2011-07-15 Thread Vladimir Panteleev
On Sat, 16 Jul 2011 00:26:15 +0300, Lars T. Kyllingstad public@kyllingen.nospamnet wrote: On Fri, 15 Jul 2011 15:42:50 -0400, Nick Sabalausky wrote: Vladimir Panteleev vladi...@thecybershadow.net wrote in message news:op.vyny7zfetuz...@cybershadow.mshome.net... On Fri, 15 Jul 2011 03:20:13

Re: Next in Review Queue: The New std.path

2011-07-15 Thread Jonathan M Davis
Names --- dirSeparator: I'd love to see this as something much shorter like dirSep. I think that dirSeparator is overly long - particularly for something which is likely to be used primarily in longer expressions. currentDirSymbol and parentDirSymbol: The same here. These are _way_

Re: Next in Review Queue: The New std.path

2011-07-15 Thread Andrej Mitrovic
I'd rather have `extension` renamed to getExt. `ext` is used way too often in user-code.

Re: Next in Review Queue: The New std.path

2011-07-15 Thread Jonathan M Davis
On Saturday 16 July 2011 05:34:06 Andrej Mitrovic wrote: I'd rather have `extension` renamed to getExt. `ext` is used way too often in user-code. extension is a bit iffy, since it's just the one word. So, I'm not as concerned about that one (and I'd rather have it be a property than a have it

Re: Next in Review Queue: The New std.path

2011-07-15 Thread Nick Sabalausky
Jonathan M Davis jmdavisp...@gmx.com wrote in message news:mailman.1680.1310785695.14074.digitalmar...@puremagic.com... joinPath: I'm not sure that this function should be renamed to joinPath. When discussing other modules such as as std.ascii and std.uni, we decided that they should

Re: Next in Review Queue: The New std.path

2011-07-15 Thread Jonathan M Davis
On Saturday 16 July 2011 01:10:02 Nick Sabalausky wrote: Jonathan M Davis jmdavisp...@gmx.com wrote in message news:mailman.1680.1310785695.14074.digitalmar...@puremagic.com... joinPath: I'm not sure that this function should be renamed to joinPath. When discussing other modules such

Re: Next in Review Queue: The New std.path

2011-07-14 Thread dsimcha
...And now I'll do the honors and be the first to review. Overall this looks solid and well documented but I have a few nitpicks and questions 1. Do we really need currentDirSymbol and parentDirSymbol? AFAIK they're standard across all operating systems that anyone cares about and everyone

Re: Next in Review Queue: The New std.path

2011-07-14 Thread Andrej Mitrovic
Lars, is normalize basically that feature request (toNativePath) I asked for? It does seem to do more than that though.

Re: Next in Review Queue: The New std.path

2011-07-14 Thread Andrej Mitrovic
All functions have nice names except fcmp, why the abbreviation? Is expandTilde supposed to work on Windows? I've never seen tilde used there.

Re: Next in Review Queue: The New std.path

2011-07-14 Thread bearophile
Just few comments to the source code. I have not used it yet. version (Windows) private alias Signed!size_t ssize_t; Why not just ptrdiff_t ? --- In theory this too is (in C[] path) but I presume you have found troubles: private C[] chompDirSeparators(C)(C[] path) @safe pure

Re: Next in Review Queue: The New std.path

2011-07-14 Thread Jonathan M Davis
On 2011-07-14 17:33, dsimcha wrote: 3. All the stuff from the old std.path should be scheduled for deprecation. Deprecating stuff breaks people's build processes and should only be done after adequate warning. I don't know a good way to implement this for enums and aliases, though, which I

Re: Next in Review Queue: The New std.path

2011-07-14 Thread bearophile
dsimcha: Author's comments -- please read before reviewing: Thirdly, I have applied @safe, pure and nothrow wherever possible. There were cases where this was not possible, either due to bugs in DMD (specifically, 5304, 5700 and 5798) or due to functions in other Phobos modules not being