On Monday, 2 February 2015 at 21:04:11 UTC, Nordlöw wrote:
Made it PR at
https://github.com/D-Programming-Language/dmd/pull/4371
Synched with DMD D conversion and improved isInputRange and
message at:
https://github.com/dlang/dmd/pull/4371
On Monday, 2 February 2015 at 19:04:52 UTC, Nordlöw wrote:
https://github.com/nordlow/dmd/commit/40ce0ecf34f90c4d3053c47e9286d7574f596e15
Made it PR at
https://github.com/D-Programming-Language/dmd/pull/4371
Nordlöw:
Is started digging a bit...
The magic happens at line 103 in cast.c.
How do I most conveniently figure out which members (functions)
a type (e-type) has?
I figured I could check for typical InputRange members and
issue a hint about using .array if e-type has them.
It's probably
On Monday, 2 February 2015 at 16:56:02 UTC, bearophile wrote:
Nordlöw:
Is started digging a bit...
The magic happens at line 103 in cast.c.
How do I most conveniently figure out which members
(functions) a type (e-type) has?
I figured I could check for typical InputRange members and
On Wednesday, 28 January 2015 at 23:21:34 UTC, Nordlöw wrote:
I'll dig into it later on...
Is started digging a bit...
The magic happens at line 103 in cast.c.
How do I most conveniently figure out which members (functions) a
type (e-type) has?
I figured I could check for typical
is there any simple way to convert?
int [] arr1 = [1,2,3].map!a*2; //compile error
int [] arr2 = [1,2,3].filter!a3;//compile error
On Wednesday, 28 January 2015 at 23:15:32 UTC, bearophile wrote:
I think you can try to open a diagnostic enhancement request.
Nice, that's what I'd hoped for you'd say :)
I'll dig into it later on...
Chris Williams:
Range is not castable to array. See std.array.array to generate
an array from a Range.
Currently this program:
void main() {
import std.range;
int[] a = iota(10);
}
Gives an error like:
test.d(3,19): Error: cannot implicitly convert expression
(iota(10)) of type
On Wednesday, 28 January 2015 at 22:43:36 UTC, bearophile wrote:
It's such a fundamental part of D+Phobos that newbies are
forced to learn this quickly. On the other hand an informative
error message could be useful...
What error message do you suggest?
Something like:
..., expression
On Wednesday, 28 January 2015 at 14:32:38 UTC, mzf wrote:
is there any simple way to convert?
int [] arr1 = [1,2,3].map!a*2; //compile error
int [] arr2 = [1,2,3].filter!a3;//compile error
auto arr1 = [1,2,3].map!a*2.array;
auto arr2 = [1,2,3].filter!a3.array;
Nordlöw:
Is there any chance we could add logic to dmd+phobos that hints
user about this?
It's such a fundamental part of D+Phobos that newbies are forced
to learn this quickly. On the other hand an informative error
message could be useful...
What error message do you suggest?
Bye,
On Wednesday, 28 January 2015 at 14:54:27 UTC, data man wrote:
auto arr1 = [1,2,3].map!a*2.array;
auto arr2 = [1,2,3].filter!a3.array;
Is there any chance we could add logic to dmd+phobos that hints
user about this?
On Wednesday, 28 January 2015 at 22:43:36 UTC, bearophile wrote:
Nordlöw:
Is there any chance we could add logic to dmd+phobos that
hints user about this?
It's such a fundamental part of D+Phobos that newbies are
forced to learn this quickly. On the other hand an informative
error message
13 matches
Mail list logo