On 5/10/17 3:45 PM, Stefan Koch wrote:
On Wednesday, 10 May 2017 at 18:41:30 UTC, Timon Gehr wrote:
On 10.05.2017 16:21, Stefan Koch wrote:
On Wednesday, 10 May 2017 at 14:13:09 UTC, Timon Gehr wrote:
On 10.05.2017 15:18, Stefan Koch wrote:
if you try assert([] is null), it should fail.
It
On Wednesday, 10 May 2017 at 18:41:30 UTC, Timon Gehr wrote:
On 10.05.2017 16:21, Stefan Koch wrote:
On Wednesday, 10 May 2017 at 14:13:09 UTC, Timon Gehr wrote:
On 10.05.2017 15:18, Stefan Koch wrote:
if you try assert([] is null), it should fail.
It doesn't. I have tried to make that poin
On 10.05.2017 16:21, Stefan Koch wrote:
On Wednesday, 10 May 2017 at 14:13:09 UTC, Timon Gehr wrote:
On 10.05.2017 15:18, Stefan Koch wrote:
if you try assert([] is null), it should fail.
It doesn't. I have tried to make that point before, unsuccessfully.
Empty arrays may or may not be null,
On Wednesday, 10 May 2017 at 14:13:09 UTC, Timon Gehr wrote:
On 10.05.2017 15:18, Stefan Koch wrote:
if you try assert([] is null), it should fail.
It doesn't. I have tried to make that point before,
unsuccessfully.
Empty arrays may or may not be null, but the empty array
literal is always
On 10.05.2017 15:18, Stefan Koch wrote:
if you try assert([] is null), it should fail.
It doesn't. I have tried to make that point before, unsuccessfully.
Empty arrays may or may not be null, but the empty array literal is
always null.
On Wednesday, 10 May 2017 at 13:11:46 UTC, Atila Neves wrote:
On Wednesday, 10 May 2017 at 11:12:06 UTC, Stefan Koch wrote:
null :
() { Slice* s; s = null; return s; }
[] :
() { Slice* s; s = alloca(sizeof(*s)); s.base = null; s.length
= 0; return s; }
Therefore
null.length => (cast(Slice*
On Wednesday, 10 May 2017 at 11:12:06 UTC, Stefan Koch wrote:
On Wednesday, 10 May 2017 at 09:42:53 UTC, Timon Gehr wrote:
[...]
So here is the difference between null and []:
null :
() { Slice* s; s = null; return s; }
[] :
() { Slice* s; s = alloca(sizeof(*s)); s.base = null; s.length
=
On Wednesday, 10 May 2017 at 09:42:53 UTC, Timon Gehr wrote:
On 09.05.2017 23:56, Timon Gehr wrote:
core.exception.AssertError@ddmd/blockexit.d(90): Assertion
failure
...
Thanks! (It's a known issue though:
https://github.com/tgehr/dmd/blob/static-foreach/test_staticforeach
On 09.05.2017 23:56, Timon Gehr wrote:
core.exception.AssertError@ddmd/blockexit.d(90): Assertion failure
...
Thanks! (It's a known issue though:
https://github.com/tgehr/dmd/blob/static-foreach/test_staticforeach.d#L330.)
Actually, yours is a different case with the same o
On 09.05.2017 23:56, Timon Gehr wrote:
core.exception.AssertError@ddmd/blockexit.d(90): Assertion failure
...
Thanks! (It's a known issue though:
https://github.com/tgehr/dmd/blob/static-foreach/test_staticforeach.d#L330.)
I guess the problem is that I do not propagate the e
On 5/10/17 1:00 AM, Andrei Alexandrescu wrote:
On 5/10/17 12:56 AM, Timon Gehr wrote:
Thanks! (It's a known issue though:
https://github.com/tgehr/dmd/blob/static-foreach/test_staticforeach.d#L330.)
I guess the problem is that I do not propagate the error condition
properly, but I'm not sur
On 5/10/17 12:56 AM, Timon Gehr wrote:
Thanks! (It's a known issue though:
https://github.com/tgehr/dmd/blob/static-foreach/test_staticforeach.d#L330.)
I guess the problem is that I do not propagate the error condition
properly, but I'm not sure how to do it. (In my frontend, error handling
On 09.05.2017 23:39, Guillaume Boucher wrote:
On Tuesday, 9 May 2017 at 03:06:37 UTC, Timon Gehr wrote:
If you are interested in static foreach making it into the language,
please play with the implementation and tell me how to break it.
Code:
void main() {
void f() { idonotexist(); }
On Tuesday, 9 May 2017 at 03:06:37 UTC, Timon Gehr wrote:
If you are interested in static foreach making it into the
language, please play with the implementation and tell me how
to break it.
Code:
void main() {
void f() { idonotexist(); }
static foreach(j;0..0) {
On 5/9/17 3:46 PM, Timon Gehr wrote:
On 09.05.2017 08:17, rikki cattermole wrote:
On 09/05/2017 7:10 AM, Jack Stouffer wrote:
On Tuesday, 9 May 2017 at 03:06:37 UTC, Timon Gehr wrote:
...
I'm going to save you some time and tell you that Andrei and Walter are
going to require a DIP for this.
On 09.05.2017 05:42, Timon Gehr wrote:
On 09.05.2017 05:06, Timon Gehr wrote:
...
Some examples:
https://github.com/tgehr/dmd/blob/71ab1280c88f9f0922fabf89ab3e7e1164b70e8b/src/test_staticforeach.d
Better link:
https://github.com/tgehr/dmd/blob/static-foreach/src/test_staticforeach.d
Mov
On 09.05.2017 08:17, rikki cattermole wrote:
On 09/05/2017 7:10 AM, Jack Stouffer wrote:
On Tuesday, 9 May 2017 at 03:06:37 UTC, Timon Gehr wrote:
...
I'm going to save you some time and tell you that Andrei and Walter are
going to require a DIP for this.
http://forum.dlang.org/thread/oenjm
On 09.05.2017 09:26, Daniel N wrote:
On Tuesday, 9 May 2017 at 03:42:48 UTC, Timon Gehr wrote:
On 09.05.2017 05:06, Timon Gehr wrote:
...
Some examples:
https://github.com/tgehr/dmd/blob/71ab1280c88f9f0922fabf89ab3e7e1164b70e8b/src/test_staticforeach.d
Better link:
https://github.com/tgeh
On Tuesday, 9 May 2017 at 09:17:06 UTC, Corey wrote:
On Tuesday, 9 May 2017 at 03:06:37 UTC, Timon Gehr wrote:
(the implementation is the result of two days of exhausting
trial-and-error figuring out how the DMD frontend works).
First time dealing with the frontend? Heck, two days sounds
fast
On Tuesday, 9 May 2017 at 03:06:37 UTC, Timon Gehr wrote:
(the implementation is the result of two days of exhausting
trial-and-error figuring out how the DMD frontend works).
First time dealing with the frontend? Heck, two days sounds fast
to me.
On Tuesday, 9 May 2017 at 03:42:48 UTC, Timon Gehr wrote:
On 09.05.2017 05:06, Timon Gehr wrote:
...
Some examples:
https://github.com/tgehr/dmd/blob/71ab1280c88f9f0922fabf89ab3e7e1164b70e8b/src/test_staticforeach.d
Better link:
https://github.com/tgehr/dmd/blob/static-foreach/src/test_sta
On 09/05/2017 7:10 AM, Jack Stouffer wrote:
On Tuesday, 9 May 2017 at 03:06:37 UTC, Timon Gehr wrote:
...
I'm going to save you some time and tell you that Andrei and Walter are
going to require a DIP for this.
http://forum.dlang.org/thread/oenjmm$lds$1...@digitalmars.com
On Tuesday, 9 May 2017 at 03:06:37 UTC, Timon Gehr wrote:
...
I'm going to save you some time and tell you that Andrei and
Walter are going to require a DIP for this.
On 09.05.2017 05:06, Timon Gehr wrote:
...
Some examples:
https://github.com/tgehr/dmd/blob/71ab1280c88f9f0922fabf89ab3e7e1164b70e8b/src/test_staticforeach.d
Better link:
https://github.com/tgehr/dmd/blob/static-foreach/src/test_staticforeach.d
Code: https://github.com/dlang/dmd/pull/6760
Some examples:
https://github.com/tgehr/dmd/blob/71ab1280c88f9f0922fabf89ab3e7e1164b70e8b/src/test_staticforeach.d
This is a complete proof-of-concept implementation of "static foreach".
The semantics of the construct are given by merging the ones
25 matches
Mail list logo