Why D _still_ needs the C preprocessor

BCS ao at pathlink.com
Sun May 6 15:41:37 PDT 2007


Reply to Justin,

> nobody at nowhere.nonet Wrote:
> 
> It's not as sugary sweet as you may want, but you can leave off the
> 'delegate' keyword.
> 
> OMF_Record[] results = library.select_records((OMF_Record rec) {
> return (rec.record_type == LIB_HEADER);});
> 
 I can't think of any reason that the above shouldn't be reducable to

auto results = lib.select_records((rec){return (rec.record_type == LIB_HEADER);});

as long as there is only one function that take a delegate that takes one 
argument, the type of the argument could be inferred.




More information about the Digitalmars-d-learn mailing list