I/O related question, and ini parsing

Gary Willoughby dev at nomad.so
Sat Dec 7 11:44:39 PST 2013


On Friday, 6 December 2013 at 05:32:56 UTC, Mineko wrote:
> On Friday, 6 December 2013 at 05:22:07 UTC, Ali Çehreli wrote:
>> On 12/05/2013 08:43 PM, Mineko wrote:
>>
>> > I might be missing out on some D-only features
>>
>> The first thing I've noticed is that you are not using UFCS, 
>> perhaps because you don't like it (yet ;) ) but look how 
>> natural the syntax becomes:
>>
>> existing code (my indentation):
>>
>>    temp = findSplitAfter(findSplitBefore(find(source, var~" = 
>> "),
>>                                          ";")[0], " = ")[1];
>>
>> code taking advantage of D's UFCS (I hope I got it right; I 
>> have not compiled it):
>>
>>    temp = source
>>           .find(var~" = ")
>>           .findSplitBefore(";")[0]
>>           .findSplitAfter(" = ")[1];
>>
>> Ali
>
> I didn't even know that existed, I'll jump on that right now.

You can read more about that here: 
http://nomad.so/2013/08/alternative-function-syntax-in-d/


More information about the Digitalmars-d-learn mailing list