| Thread overview | |||||
|---|---|---|---|---|---|
|
May 17, 2015 Some piece of WAT, is that a bug or a feature ? | ||||
|---|---|---|---|---|
| ||||
So this code:
void main() {
string outs;
void foo() {
outs ~= "prout !";
}
import std.stdio;
writeln(outs);
}
Obviously print an empty string.
Bug or feature ?
| ||||
May 17, 2015 Re: Some piece of WAT, is that a bug or a feature ? | ||||
|---|---|---|---|---|
| ||||
Posted in reply to deadalnix | On 17/05/2015 8:38 p.m., deadalnix wrote:
> So this code:
>
> void main() {
> string outs;
>
> void foo() {
> outs ~= "prout !";
> }
>
> import std.stdio;
> writeln(outs);
> }
>
> Obviously print an empty string.
>
> Bug or feature ?
Feature. foo is never called.
| |||
May 17, 2015 Re: Some piece of WAT, is that a bug or a feature ? | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Rikki Cattermole | On Sunday, 17 May 2015 at 08:48:10 UTC, Rikki Cattermole wrote:
> On 17/05/2015 8:38 p.m., deadalnix wrote:
>> So this code:
>>
>> void main() {
>> string outs;
>>
>> void foo() {
>> outs ~= "prout !";
>> }
>>
>> import std.stdio;
>> writeln(outs);
>> }
>>
>> Obviously print an empty string.
>>
>> Bug or feature ?
>
> Feature. foo is never called.
Damn it I fucked up when reducing my sample code.
| |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply