On Sun, Dec 8, 2013 at 9:59 AM, seany wrote:
> O_O
>
> with that knowledge, would also be possible to define new types (not
> aliases, but new encapsulated types) representing things such as Graph,
> Ring, Topology, surreal number, etc?
Other posters already answered your questions concerning ran
On 12/08/2013 03:41 AM, seany wrote:
On Sunday, 8 December 2013 at 11:02:40 UTC, Ali Çehreli wrote:
(I remember Andrei's original newsgroup post about this discovery but
I cannot find it at this time.)
http://www.digitalmars.com/d/archives/digitalmars/D/announce/Voldemort_Types_in_D_23511.html
On Sunday, 8 December 2013 at 11:02:40 UTC, Ali Çehreli wrote:
(I remember Andrei's original newsgroup post about this
discovery but I cannot find it at this time.)
http://www.digitalmars.com/d/archives/digitalmars/D/announce/Voldemort_Types_in_D_23511.html
this?
Ali Çehreli:
When you eagerly need an actual array of the elements, call
std.array.array on Result:
import std.array;
import std.algorithm;
void main()
{
auto input = "hello world";
auto splittedWords = input.splitter(' ').array;
Or just use the eager split() function.
Bye,
bearoph
On 12/08/2013 12:59 AM, seany wrote:
> I dont find this in your book, would you consider either adding this
> Volodemrot types,
I think at least a short mention is in order. :)
There are two reasons why they don't appear in the book (yet):
1) They are not a proper language feature, rather a ha
Am Sun, 08 Dec 2013 09:59:55 +0100
schrieb "seany" :
> O_O
>
> with that knowledge, would also be possible to define new types
> (not aliases, but new encapsulated types) representing things
> such as Graph, Ring, Topology, surreal number, etc?
All these Result types are simply structs. Struct
Am Sun, 08 Dec 2013 09:24:53 +0100
schrieb "seany" :
> std.algorithm.splitter seems to return all its return values as a
> type "Result", without quotes, and i dont not seem to be able to
> cast it to string[] or int[] with cast(string[]) ( or even cast
> (string) - i tried that too).
>
> I t
O_O
with that knowledge, would also be possible to define new types
(not aliases, but new encapsulated types) representing things
such as Graph, Ring, Topology, surreal number, etc?
I dont find this in your book, would you consider either adding
this Volodemrot types, or in case they already
On 12/08/2013 12:24 AM, seany wrote:
> std.algorithm.splitter seems to return all its return values as a type
> "Result", without quotes, and i dont not seem to be able to cast it to
> string[] or int[] with cast(string[]) ( or even cast (string) - i tried
> that too).
>
> I tried to use a funct