Can your programming language do this?
destructionator at gmail.com
Mon Jan 24 17:11:23 PST 2011
> You should stick this in the announcements group.
Yeah, I'm still working some kinks out though. (Trial by fire - I
ended up pushing the *new* mysql module to the live work server in
an unrelated update yesterday! So now frantically fixing things
for tonight's launches...
The breakage is it used to have query(T...)(). Now it is query(...).
The reason is templates aren't allowed in interfaces, and I wanted
query in the interface, so yeah. (Before, I just used the class
everywhere and didn't have an interface at all.)
Now, the template would handle all types or fail to compile. The
runtime (...) only does a specific list, and fails at runtime.
(I also tried Variant..., which is in my interface for queryImpl,
the actual virtual function, but it wasn't convenient to use and
broke virtually *all* of my existing code. So I went with plain ...)
So I put in the common types I know I use: int, long, string. The
And now I'm getting exceptions on such ridiculous things like
const(long), immutable(long), immutable(string) and the sort!
I didn't expect const and immutable to have so many different
typeid, especially on the primitives. Really, what's the difference
between const(int) and immutable(int)?
But it's easy enough to add them at least. I really wish we
had the ability to have final templates in interfaces though.
Oh well, it works anyway, just needs more experience in it.
But yeah, next weekend I'll post it to the announcement group. These
kinks should be worked out by then.
I just posted it yesterday because I think this newsgroup gets
too little positive success stories about working with D!
More information about the Digitalmars-d