In the following D2 the D type system is strong enough to allow foo1() to be
pure because sqr() is a pointer to a pure function. In foo2() I have tried to
do the same thing avoiding templates, and it works. In foo3() I have tried to
write the type literal, but I was not able to:
pure int sqr(i
I have similar situation. My employer could consider to use D for
prototyping or even production, but lack of linux armel cross compiler
is show-stopper for us.
--
serg.
Thanks Trass3r and Bearophile for the quick responses.
Ralph.
dcoder wrote:
== Quote from Steven Schveighoffer (schvei...@yahoo.com)'s article
This is what I think you should use:
string[int[2]]
board[[0,0]] = "Rook";
Further to what others have said, why use strings? There are only 12
possible chess pieces (black and white), plus blank, so probably
Simen kjaeraas:
> Check the code again. int[3] is stack-allocated. There is a temporary on
> the heap, but it is thrown away after being used to initialize a.
I didn't see the 3.
I am very sorry Deokjae Lee... -.-'
bearophile wrote:
Deokjae Lee:
What's the meaning of the line A?
It creates on the stack a 2-word structure, puts unsigned 3 in one word
and in the other word puts a pointer to a newly allocated area on the
GC-managed heap, that can contain 3 integers (plus one bookkeeping
byte), so t
Deokjae Lee:
> What's the meaning of the line A?
It creates on the stack a 2-word structure, puts unsigned 3 in one word and in
the other word puts a pointer to a newly allocated area on the GC-managed heap,
that can contain 3 integers (plus one bookkeeping byte), so this heap area is
probably
Deokjae Lee wrote:
Hi there, I have some questions on the following code.
import std.stdio;
struct S {
int x;
}
void main() {
int[3] a = new int[3];//A
S* b = new S();//B
delete b;//C
}
What's the meaning of the line A?
Create a static array on the stack, a
Ralph:
> 1. When will a 64-bit compiler be available for Linux (ideally Red
> Hat Enterprise Linux x86_64)?
Walter is working on 64 bit port right now, he said it will take two months, he
has already compiled a hello world with it days ago, so he's probably past 1/3
or 1/2 of the work. So if th
GDC and LDC basically support x64 but D2 support isn't mature.
http://packages.debian.org/squeeze/gdc-4.3
http://dsource.org/projects/ldc/wiki/PlatformSupport
1. When will a 64-bit compiler be available for Linux (ideally Red
Hat Enterprise Linux x86_64)?
This is heavily being worked on:
http://dsource.org/projects/dmd/log/trunk
GDC and LDC basically support x64 but D2 support isn't mature.
2. Is ODBC supported? Is there a Phobos library or is it
Hello Deokjae,
Hi there, I have some questions on the following code.
import std.stdio;
struct S {
int x;
}
void main() {
int[3] a = new int[3];//A
S* b = new S();//B
delete b;//C
}
What's the meaning of the line A?
Is the array allocated on heap? or stack?
IITC new give you something on
Hi,
D2.0 seems to be ideal for the enterprise applications my company
produces and is a big improvement on C++. However before I could
propose it for formal evaluation and prototyping, I need answers to
the following questions. Any help would be greatly appreciated.
1. When will a 64-bit compiler
Hi there, I have some questions on the following code.
import std.stdio;
struct S {
int x;
}
void main() {
int[3] a = new int[3];//A
S* b = new S();//B
delete b;//C
}
What's the meaning of the line A?
Is the array allocated on heap? or stack?
Is it dynamic or sta
Can you write a minimal example? This can be good for bugzilla (I have
added there several bad error message errors).
I added this: http://d.puremagic.com/issues/show_bug.cgi?id=4497
15 matches
Mail list logo