digitalmars.D.learn - Re: Code to show
- bearophile <bearophileHUGS lycos.com> Mar 05 2008
- Bill Baxter <dnewsgroup billbaxter.com> Mar 05 2008
Bill Baxter:Sorry I didn't read your post in detail, but if think C-like behavior is easier, then why don't you just use std.c.stdlib.{malloc,calloc,alloca,realloc,free} ?
You may want to read my post :-) If you create a data structure you may want to mix GC-managed things with data structures allocated manually. This leads to things I don't understand yet (until someone explains me, or I just read the whole code of the Phobos GC). Bye, bearophile
Mar 05 2008
bearophile wrote:Bill Baxter:Sorry I didn't read your post in detail, but if think C-like behavior is easier, then why don't you just use std.c.stdlib.{malloc,calloc,alloca,realloc,free} ?
You may want to read my post :-) If you create a data structure you may want to mix GC-managed things with data structures allocated manually. This leads to things I don't understand yet (until someone explains me, or I just read the whole code of the Phobos GC).
Ok, I just latched on to your phrase "Programming in C is much simpler". If C doesn't even support the kind of thing you want to do, then you can't really say it's simpler. Simplistic maybe. After all, anything you can do in C you can pretty much do with very similar code in D. --bb
Mar 05 2008