[phobos] Deprecation of std.regexp
Brad Roberts
braddr at puremagic.com
Sun Jun 5 00:56:10 PDT 2011
On 6/5/2011 12:52 AM, Jonathan M Davis wrote:
> It looks like std.regexp was marked in its documentation as deprecated in
> 2.053. It was not actually deprecated (the deprecation modifier is missing),
> but if it has indeed been deprecated (and std.regex has been around for a
> while, so it's not exactly a surprise), then it needs to actually be
> deprecated, and the rest of Phobos needs to be using std.regex instead. I can
> easily deprecate the function (after all, all you have to do is add
> deprecated: near the top of the file), but since I've never used either of the
> regex modules, I'm ill-suited to convert the rest of Phobos to use std.regex.
> So, I'd appreciate it if someone who is actually familiar with the two modules
> would convert the rest of Phobos to use std.regex sometime prior to the next
> release, and then we can actually deprecate std.regexp. Worse comes to worst,
> I can take a crack at it, but it would be much faster if someone who's
> familiar with the regex modules did it.
>
> Now, we may actually want to change std.regexp to "scheduled for deprecation"
> rather than deprecated simply because there are other functions in Phobos
> which take stuff from std.regexp but not std.regex (such as the version of
> std.file.listdir which takes a RegExp) have not yet been scheduled for
> deprecation, let alone deprecated, but regardless, we need to change the rest
> of Phobos to use std.regex or we won't be able to actually deprecate and
> remove std.regexp (well, I suppose that we _could_ deprecate it as-is, but it
> seems to me to be a bad idea to deprecate something when Phobos is still using
> it in its API elsewhere).
>
> - Jonathan M Davis
It was marked deprecated once (check out the blame history of the file), but that was reverted since commonly used
modules still use it. The effect would be that essentially every app would need to be compiled with -d, which is hardly
useful. Until phobos doesn't use it, no real deprecation can actually occur.
More information about the phobos
mailing list