Future of string lambda functions/string predicate functions

John Colvin john.loughran.colvin at gmail.com
Tue Aug 6 14:35:04 PDT 2013


On Tuesday, 6 August 2013 at 20:28:59 UTC, Peter Alexander wrote:
> On Tuesday, 6 August 2013 at 09:05:57 UTC, Jakob Ovrum wrote:
>> Specifically, I suggest the following deprecation path:
>>
>> * Add deprecation notes to std.functional's unaryFun and 
>> binaryFun so users are dissuaded from using them in new code. 
>> In time, we would remove their documentation.
>> * Leave support for string lambdas in existing Phobos 
>> functions for the foreseeable future, for 
>> backwards-compatibility purposes.
>> * Change all documentation so that it doesn't mention string 
>> lambdas, whether in prose or code. Phobos pull request #707 
>> (Switch std.algorithm/.range to lambda syntax)[2] attempted 
>> this and was approved and merged, but subsequently reverted 
>> due to bugs.
>> * New functions would not support string lambdas.
>
> Yes x 4. I think this is the perfect path to their 
> semi-deprecation.
>
> Deprecating them completely, I think, would be unwise since 
> there's a lot of code out there using them. Deprecation through 
> obscurity while retaining backwards-compatibility is the right 
> choice.

I agree this is the best decision.


More information about the Digitalmars-d mailing list