September 18, 2009 Re: D1: std.md5: corrections for the given example | ||||
---|---|---|---|---|
| ||||
Posted in reply to notna | notna wrote: > grauzone schrieb: <snip> >> http://d.puremagic.com/issues/enter_bug.cgi > > ??? > > What do you wanna tell us? Where to report bugs. > That > while (auto len = file.readBlock(buffer.ptr, buffer.sizeof)) > has to work and does not because it's a bug? If you want to know whether a piece of code is legal or not, try reading the D documentation. > And that's why you think a bug report should be opened? No, that this code example in the Phobos documentation is wrong and therefore a bug report should be opened. Stewart. |
September 19, 2009 Re: D1: std.md5: corrections for the given example | ||||
---|---|---|---|---|
| ||||
Posted in reply to notna | notna wrote:
> grauzone schrieb:
>
>>>> md5_example_2.d(7): expression expected, not 'auto'
>>>> md5_example_2.d(7): found 'len' when expecting ')'
>>>> md5_example_2.d(7): found '=' instead of statement
>>>>
>>>> (this is line 7 after I removed comments and blank lines from your edit)
>>>>
>>>> Stewart.
>>>
>>> God I'm stupid.
>>>
>>> Sorry.
>>>
>>> I guess I wish that worked.
>>
>> http://d.puremagic.com/issues/enter_bug.cgi
>
> ???
>
> What do you wanna tell us? That
> while (auto len = file.readBlock(buffer.ptr, buffer.sizeof))
> has to work and does not because it's a bug? And that's why you think a bug report should be opened?
Enhancement request to allow auto in while, to make it consistent with if. (You can write "if(auto x = foo()) {...}")
|
September 19, 2009 Re: D1: std.md5: corrections for the given example | ||||
---|---|---|---|---|
| ||||
Posted in reply to grauzone | grauzone wrote: > notna wrote: <snip> >> What do you wanna tell us? That >> while (auto len = file.readBlock(buffer.ptr, buffer.sizeof)) >> has to work and does not because it's a bug? And that's why you think a bug report should be opened? > > Enhancement request to allow auto in while, to make it consistent with if. (You can write "if(auto x = foo()) {...}") The chance of an enhancement request being landed in the D1 line has always been small, and now it's even smaller. Stewart. |
Copyright © 1999-2021 by the D Language Foundation