Why does readln include the line terminator?

Christopher Wright dhasenan at gmail.com
Wed Apr 15 19:54:50 PDT 2009


Robert Fraser wrote:
> Christopher Wright wrote:
>> Steven Schveighoffer wrote:
>>> auto reader = file.byLine!("/[.,]/")();
>>
>> Why specify anything at compile time when a user could reasonably 
>> generate the value at runtime?
>>
>> auto reader = file.byLine(readConfig().separator);
> 
> Yes, and for maximum abstraction, the config file should be stored as 
> XML in a TEXT field of a database on another server.

I just really hate to see templates when a regular function would 
suffice and be so close to the same efficiency as makes no difference 
for most reasonable situations. If there's a significant performance 
increase, I want to see both options.



More information about the Digitalmars-d mailing list