Regression?

Sebastiaan Koppe via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Sep 8 18:35:25 PDT 2015


On Tuesday, 8 September 2015 at 07:12:52 UTC, FreeSlave wrote:
> On Tuesday, 8 September 2015 at 04:04:16 UTC, Sebastiaan Koppe 
> wrote:
>> Fixed it by changing into:
>>
>> ```
>> 	import std.conv : text;
>> 	string json = 
>> File("../languages.json","r").byLineCopy().joiner.text;
>> 	auto ls = json.parseJSON();
>> ```
>
> Why would you read file by line and then merge all into one 
> string? You end up with reading the whole file (well, getting 
> rid of line ends) anyway, so probably the more efficient 
> solution would be just read the whole file at once with 
> std.file.read and cast to string.

Thanks for your advice. But that is not what I asked for.

The question was, why doesn't this work anymore with the latest 
(2.068.0 and 2.068.1) compiler:

```
auto ls = 
File("../languages.json","r").byLineCopy().joiner.parseJSON();
```

It should. Right?


More information about the Digitalmars-d-learn mailing list