On Wednesday, 13 February 2019 at 16:40:18 UTC, H. S. Teoh wrote:
So ironically, the iron-clad semantics of D's const system
turns out to be also its own downfall.
Such things are not ironic. There is always a trade off. You get
nothing for free in this universe. Physics tells us this.
foo(cast(void*)[Object1, Object2]);
foo(cast(bool delegate(void*))(Tuple!(X,Y) objects)) { });
One can pass arbitrary data as an array(the cast is ugly though)
Then the tuple is cast back to void* but one can access objects
correctly with typing.
This works well when interacting with
I'm new to component based programming. I've read it is an
alternative to oop for speed. I don't understand how it is
possible to have an alternative to oop and still have oop like
behavior(polymorphism) nor how to do this. It seems all the great
things oop offers(all the design patterns)
Error: static variable `thompsonFactory` cannot be read at
compile time, Trying to regex an import file.
Also I have a group (...)* and it always fails or matches only
one but if I do (...)(...)(...) it matches all 3(fails if more or
less of course. ... is the regex).
Also when I ignore a
Consider
void foo(string A = "")(string B = "")
{
static if (A != "")
do(A);
else
do(B);
}
foo!("x");
foo("x");
This is necessary because D's templating and meta programming
system is frail.
While CTFE should take care of such things, it does not, consider