Future of string lambda functions/string predicate functions
Jonathan M Davis
jmdavisProg at gmx.com
Thu Aug 8 09:52:05 PDT 2013
On Thursday, August 08, 2013 07:29:56 H. S. Teoh wrote:
> Seems this thread has quietened down. So, what is the conclusion? Seems
> like almost everyone concedes that silent deprecation is the way to go.
> We still support string lambdas in the background, but in public docs we
> promote the use of the new lambda syntax. Would that be a fair
> assessment of this discussion?
I find it interesting that very few Phobos devs have weighed in on the matter,
but unfortunately, most of the posters who have weighed in do seem to be
against keeping them.
> What about new Phobos functions? Should we continue to support string
> lambdas in new code?
Personally, I don't think that silent deprecation is ever a good idea. If we
do that, we're going to end up with confusion over which functions accept
strings and which don't, and it won't be clear that we're trying to get rid of
them. I think that we need to clearly choose one path or the other: either
1. Choose to keep string lambdas around permanently and support them, even if
they're used for a limited number of use cases (e.g. with simple lambdas which
use operators but not function calls).
or
2. Put them on the path to deprecation towards removal (in which case, they
might actually stay marked as deprecated for quite some time to come but would
clearly be unacceptable for new code and might be fully removed at some point
in the future).
- Jonathan M Davis
More information about the Digitalmars-d
mailing list