D - auto Suggestion
- Phill (7/7) Apr 02 2004 Shouldn't variables be "auto" automatically?
- C (10/17) Apr 05 2004 I think the basic types are auto'ed , and structs are automatically auto...
- J Anderson (7/12) Apr 05 2004 I just remember that classes in D are actually pointers to objects, not
-
Phill
(15/22)
Apr 05 2004
"C"
wrote in message news:opr5z5iqrdehmtou@localhost.... - Achilleas Margaritis (4/8) Apr 27 2004 Auto objects are not on the stack. They are on the heap, but their destr...
Shouldn't variables be "auto" automatically? I was surprised to read that they werent. Phill. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.644 / Virus Database: 412 - Release Date: 3/26/2004
Apr 02 2004
I think the basic types are auto'ed , and structs are automatically auto= , = but classes require the keyword. Its kinda hard coming from C++ to get = over having to 'new' something thats on the stack , but it does drive ho= me = the point that everything must be new'ed :). C On Sat, 3 Apr 2004 07:55:59 +1000, Phill <phill pacific.net.au> wrote:Shouldn't variables be "auto" automatically? I was surprised to read that they werent. Phill. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.644 / Virus Database: 412 - Release Date: 3/26/2004-- = D Newsgroup.
Apr 05 2004
C wrote:I think the basic types are auto'ed , and structs are automatically auto, but classes require the keyword. Its kinda hard coming from C++ to get over having to 'new' something thats on the stack , but it does drive home the point that everything must be new'ed :). CI just remember that classes in D are actually pointers to objects, not objects themselves. Therefore classes need to be autoed if you want them handled by the stack. Everything else (for this particular topic) works the same as in C++. -- -Anderson: http://badmama.com.au/~anderson/
Apr 05 2004
"C" <dont respond.com> wrote in message news:opr5z5iqrdehmtou localhost... I think the basic types are auto'ed , and structs are automatically auto, but classes require the keyword. Its kinda hard coming from C++ to get over having to 'new' something thats on the stack , but it does drive home the point that everything must be new'ed :). Especially women! Phill C On Sat, 3 Apr 2004 07:55:59 +1000, Phill <phill pacific.net.au> wrote:Shouldn't variables be "auto" automatically? I was surprised to read that they werent. Phill. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.644 / Virus Database: 412 - Release Date: 3/26/2004-- D Newsgroup. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.648 / Virus Database: 415 - Release Date: 3/31/2004
Apr 05 2004
In article <opr5z5iqrdehmtou localhost>, C says...I think the basic types are auto'ed , and structs are automatically auto= , = but classes require the keyword. Its kinda hard coming from C++ to get = over having to 'new' something thats on the stack , but it does drive ho=Auto objects are not on the stack. They are on the heap, but their destructor is called when when the pointer goes out of scope. It is there in order to implement RAII.
Apr 27 2004