I presume your intent is to have B inherit the implementation
from A. There are two options.
If you control class A and its appropriate to declare the
interface there, you can declare that A implements I and have B
simply inherit it from A.
class A : I {
int f(int x) { return x; }
}
On Wednesday, 25 December 2013 at 09:44:32 UTC, Øivind wrote:
Strictly speaking B does not implement function and inhereting
function from base class is not the same as implementing the
function.
Yes, but it really seems like this is something that could and
should work..
If you control
To try and answer your original question more specifically. You
have told the compiler that B derives from A inheriting method f.
You have also said that B implements a virtual interface I. I
does not have an implementation, despite sharing a common
signature with f. If you just wanted f,
First, let me say thanks for the addition of the popcnt inline
assembler opcode. I had placed a project on hold until it was
available. I look forward to using D again.
I determined this instruction was available after some
experimentation as its not documented on the inline assembler
page.
Actually, I dropped the static if in my example and traded one
problem for another.
As the static variables of core.cpuid are not accessible at
compile time, I would like to emulate the cpu interrogation done
there, but I see that asm statements are disallowed in CTFE. Is
versioning the only
I retract my second concern. I misread a purity error for a CTFE
error. This does work as expected.
import core.cpuid: hasPopcnt;
/// Returns the number of bits which are set.
uint popcnt(ulong bits) nothrow
{
version(X86_64) {
if(hasPopcnt()) {
asm {
Microsoft ended mainstream (i.e. free) support for XP nearly 3 years ago.
http://support.microsoft.com/lifecycle/?ln=en-gbc2=1173
I would not make supporting an OS no longer supported by its vendor a priority,
particularly in light of the considerable efforts still needed elsewhere.
I see some recent additions were made to the inline assembler. Are there any
near term plans to support popcnt?
== Quote from Bruno Medeiros (brunodomedeiros+s...@com.gmail)'s article
I think much sooner we will
have a full D compiler written in D than a (competitive) D IDE written
in D.
I agree. I do like the suggestion for developing the D grammar in Antlr though
and
it is something I would be
The article was written in 2004. A high precision event timer has been
incorporated in chipsets since 2005.
http://en.wikipedia.org/wiki/High_Precision_Event_Timer
I hope were not basing decisions on support for NT4.0 :)
== Quote from Kagamin (s...@here.lot)'s article
Jonathan M Davis Wrote:
I am moving this answer to a new post, as my intent was not to hijack the
lexer thread.
Tiobe and others have tried to determine language popularity by various means.
They are drawing inferences where no definitive data set exists. There is no
reason to treat these numbers as scientific results.
== Quote from Nick Sabalausky (a...@a.a)'s article
In a language that has a package system that forces package names to be the
same as the directory name, and module names to be the same the file name
(Such as Java, but not D): What is the point of having packages/modules
instead of just
== Quote from Todd VanderVeen (t...@part.net)'s article
== Quote from Nick Sabalausky (a...@a.a)'s article
In a language that has a package system that forces package names to be the
same as the directory name, and module names to be the same the file name
(Such as Java, but not D): What
== Quote from Steven Schveighoffer (schvei...@yahoo.com)'s article
On Tue, 29 Jun 2010 14:51:49 -0400, Nick Sabalausky a...@a.a wrote:
In a language that has a package system that forces package names to be
the
same as the directory name, and module names to be the same the file name
== Quote from Todd VanderVeen (t...@part.net)'s article
== Quote from Steven Schveighoffer (schvei...@yahoo.com)'s article
On Tue, 29 Jun 2010 14:51:49 -0400, Nick Sabalausky a...@a.a wrote:
In a language that has a package system that forces package names to be
the
same
That's funny. I read you original answer and laughed. It was too true!
I've been lurking on the forum for awhile, but thought I would join and say
hello. I've primarily been working with enterprise Java for the past 10 years,
but have a personal project better suited for a systems language. After a
cursory review of D, I am quite excited by what it offers and means
17 matches
Mail list logo