1) can you do ... int function(const value) in D? or function(int value)
const?
2) can you do versioning like...
static if (version == ONE || version == TWO)
or version(!Windows)
?
or what about...
version( ONE || !TWO)
3) can D do default values like c++? function(int num = 0)
and you can either call function() for function(5)
4) How would I convert the command #pragma warning( disable : 4800 ) to
D? I'm not too keen on pragmas.
Thanks
~ Clay

4) How would I convert the command #pragma warning( disable : 4800 ) to
D? I'm not too keen on pragmas.

warnings in a compiler that ordinarily doesn't do warnings anyhow. Although
now that we
have the -w switch maybe there should be a disable pragma... Not sure. I
don't use -w
all that often anyhow.
-- Chris Sauls

4) How would I convert the command #pragma warning( disable : 4800 )
to D? I'm not too keen on pragmas.

In this case, I believe you'd just skip it. There's not much reason to
ignore-flag warnings in a compiler that ordinarily doesn't do warnings
anyhow. Although now that we have the -w switch maybe there should be a
disable pragma... Not sure. I don't use -w all that often anyhow.

Yea, i'll just ignore it I guess. It is not so important in the scheme
of things.

Actually it looks like he's trying to do "! TWO", so I'd use an else:
version(ONE) version = X;
version(TWO) {} else version = X;
version(X) { . . . }
Even uglier more verbose, but I think it'll work.
jcc7

Yup. :-P Adding a simple ! to the version would make things much better,
&& and || would be nice too, but I'm not sure how diffuclt these things
would be to implement. I can live with 'else' for now.
Thanks
~ Clay

Oh ok. Seems like a bit of a hack though. Imagine if I wanted to do
version(!Windows)
{
}
else
{
}
Then I'm forced to do something like...
version = TRUE
version(Windows)
{
}
else version(TRUE) // version !Windows
{
}
else
{
}
Unless there is another way around?

I have another quick question...
does D have the c++ equivilent of #pragma pack(push,1), is it not needed
with D, or just not implemented.
In the C++ code it is implemented like...
#pragma pack(push,1)
#pragma pack(1)
struct
{
a, b, c;
}
#pragma pack(1)
struct
{
...
}
#pragma(pop, 1)
Can I get the D equivilent just by using the align attribute? Thanks.
~ Clay

does D have the c++ equivilent of #pragma pack(push,1), is it not needed
with D, or just not implemented.
Can I get the D equivilent just by using the align attribute? Thanks.

It's mostly not needed because of the better alignment support in D. In
C++, the pack push and pop operations are needed because normally member
alignment is controlled by a command-line switch, so the pushing and popping
is so that changing the alignment for one struct doesn't change it for all
the rest. But in D, to change the alignment for one struct, you just use
the very obvious syntax:
align(1) struct Something
{
...
}
And the alignment will stay the same (i.e. the default, or whatever you set
them to) on all the other structs in your program.

does D have the c++ equivilent of #pragma pack(push,1), is it not needed
with D, or just not implemented.
Can I get the D equivilent just by using the align attribute? Thanks.

It's mostly not needed because of the better alignment support in D. In
C++, the pack push and pop operations are needed because normally member
alignment is controlled by a command-line switch, so the pushing and popping
is so that changing the alignment for one struct doesn't change it for all
the rest. But in D, to change the alignment for one struct, you just use
the very obvious syntax:
align(1) struct Something
{
...
}
And the alignment will stay the same (i.e. the default, or whatever you set
them to) on all the other structs in your program.

It also appears that the = operator in D is not overloadable. Should
I settle with a function called 'deepCopy()' ?

I would call it "dup" as that is what arrays use for a deep copy.
Regan

simple copy/duplication, which, if compared to object cloning/copying,
would be 'equivalent' to shallow copying, not deep copying (but such
comparision should not be made in the first place).
--
Bruno Medeiros - CS/E student
"Certain aspects of D are a pathway to many abilities some consider to
be... unnatural."