I logged this bug a while ago:
https://issues.dlang.org/show_bug.cgi?id=10291
On Friday, 2 May 2014 at 10:06:43 UTC, ref2401 wrote:
Is it a bug or is there a reason for such behaviour?
Good news and kudos to Kenji.
And yes, I think that a matrix / linear algebra library, as well
as NumPy-style ND-Arrays are great candidates for future Phobos
modules.
We've done a good bit of work with matrices at my workplace
(EMSI), so I bet someone here could find time to contribute a
So are there any significant objections to Kenji's PR?
I think it's got a lot of things going for it, particularly in
finishing the job begun by DIP#7 and opDollar. I realize it's not
likely be a top priority for most people, but it's got a lot of
bang for your buck: a great benefit to an
I would like to revisit the topic of operator overloads for
multidimensional slicing.
Bottom line: opSlice is currently limited to 1 dimension/axis
only. The cleanest workaround right now is to pass your own
slice structs to opIndex. It works but it's not too pretty.
// Suppose we have
On Monday, 28 October 2013 at 11:22:03 UTC, Jeroen Bollen wrote:
Is it possible in D to create an enum of class references?
Something around the lines of:
enum ClassReferences : Interface {
CLASS1 = ClassOne,
CLASS2 = ClassTwo
}
Here's my solution using an enum as you originally
On Wednesday, 20 November 2013 at 23:06:37 UTC, Jared Miller
wrote:
Foo getObj(ClassNames name) {
// without cast, it converts to the enum member name.
return cast(Foo)Object.factory(cast(string)name);
}
Oops, never mind - you don't need the cast(string) there.
To expand on bearophile's answer, a dynamic array is basically a
package of two things: a length and a pointer to the contents.
Each of these is 8 bytes on a 64-bit system, thus the sizeof a
dynamic array is 16 bytes.
You are asking how char, wchar, and dchar correspond to integer
types.
I wondered the same thing a couple of weeks back. It seems to
work this way to avoid certain ambiguities. Related bug report /
discussion:
http://d.puremagic.com/issues/show_bug.cgi?id=1012
I agree with other posters that a D REPL and
interactive/visualization data environment would be very cool,
but unfortunately doesn't exist. Batch computing is more
practical, but REPLs really hook new users. I see statistical
computing as a huge opportunity for D adoption. (R is just
super-ugly