Thread overview
c style coding on dmd
Nov 06, 2008
ViktorKrescvohn
Nov 06, 2008
Carl Clark
Nov 06, 2008
ore-sama
Nov 07, 2008
ore-sama
November 06, 2008
i used to c-style pointer heavy programming, is it wise to code c-style on d platfrom, i mean by turning off GC and stuff.
November 06, 2008
If you're going to write C code in D, what's the point of using D? The GC is your friend, usually, and unless you really know a lot about its functions, just let it do its thing. Of course, if you're porting C code over, that's a different matter, but when writing new D code, try to use the language advantages as much as possible.

On 2008-11-05 17:22, ViktorKrescvohn wrote:
> i used to c-style pointer heavy programming, is it wise to code c-style on d platfrom, i mean by turning off GC and stuff.
November 06, 2008
ViktorKrescvohn Wrote:

> i used to c-style pointer heavy programming, is it wise to code c-style on d platfrom, i mean by turning off GC and stuff.

I think, turning off GC is possible if you rewrite Phobos or get rid of it completely.
November 06, 2008
On Thu, Nov 6, 2008 at 2:04 PM, ore-sama <spam@here.lot> wrote:
> ViktorKrescvohn Wrote:
>
>> i used to c-style pointer heavy programming, is it wise to code c-style on d platfrom, i mean by turning off GC and stuff.
>
> I think, turning off GC is possible if you rewrite Phobos or get rid of it completely.
>

You can also do:

GC.disable();

But giving up the GC means giving up some features, like array concatenation and associative, not because they wouldn't work, but because they would leak memory and there would be no way to free the garbage that they create.

Long story short - why use D if you aren't going to be able to take advantage of the very things that make it cool?
November 07, 2008
Jarrett Billingsley Wrote:

> Long story short - why use D if you aren't going to be able to take advantage of the very things that make it cool?

Not only GC makes it cool. D has a number of other features.