Thread overview
formal writing
Jun 27, 2007
Pieter Valdano
Jun 29, 2007
Stewart Gordon
June 27, 2007
i have a project in my campus...i take D programming language as a topic... unfortune me, i get trouble in my writing...please help me to solve my problem.

1. in C and D has same way to declare variable right?. but what the differencies between C and D in variable declaration?. does identifiers influence the way of declare variabel between D and C?.

2. what do you think about perfomance between C and D?. do D better than C?.

3.does D use system memory bigger than C?.

-it seem that i doing for an interview, right?hehehehehe- thanks before....GBU

June 27, 2007
Pieter Valdano wrote:

> i have a project in my campus...i take D programming language as a topic... unfortune me, i get trouble in my writing...please help me to solve my problem.
> 
> 1. in C and D has same way to declare variable right?. but what the differencies between C and D in variable declaration?. does identifiers influence the way of declare variabel between D and C?.

Read for example http://www.digitalmars.com/d/statement.html (Declaration
statement), and http://www.digitalmars.com/d/attribute.html (attributes and
type inference). There are other differences too.

> 
> 2. what do you think about perfomance between C and D?. do D better than C?.

You can't really benchmark languages.

> 
> 3.does D use system memory bigger than C?.

Current D implementations have bigger memory footprint than C implementation by default.

> 
> -it seem that i doing for an interview, right?hehehehehe- thanks before....GBU

-- 

June 29, 2007
"Pieter Valdano" <pieter_ambonese@yahoo.co.id> wrote in message news:f5skoa$1etq$1@digitalmars.com...
> i have a project in my campus...i take D programming language as a
> topic...  unfortune me, i get trouble in my writing...please help
> me to solve my problem.
>
> 1.  in C and D has same way to declare variable right?.  but what
> the differencies between C and D in variable declaration?.  does
> identifiers influence the way of declare variabel between D and C?.
<snip>

The basic syntax is the same, but there's a handful of differences:

(a) declaring pointers:

   int* qwert, yuiop;

declares both qwert and yuiop to be pointers in D.

(b) array declaration notation:

   int[42] asdfg;

whereas C requires

   int asdfg[42];

(c) function pointer notation:

   int function(float) hjkl;

compared to the more awkward C notation

   int (*hjkl)(float);

(d) D can do a lot more than C can do here.

Stewart.