From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f5d71,d275ffeffdf83655 X-Google-Attributes: gidf5d71,public X-Google-Thread: 146b77,d275ffeffdf83655 X-Google-Attributes: gid146b77,public X-Google-Thread: 103376,d275ffeffdf83655 X-Google-Attributes: gid103376,public X-Google-Thread: 109fba,d275ffeffdf83655 X-Google-Attributes: gid109fba,public From: Laurent Safa Subject: Re: Dynamic memory? (was Re: Ada vs C++ vs Java) Date: 1999/01/19 Message-ID: <36A3F46A.5CE62C90@icrl.mew.co.jp>#1/1 X-Deja-AN: 434259563 Content-Transfer-Encoding: 7bit References: <369C1F31.AE5AF7EF@concentric.net> <369DDDC3.FDE09999@sea.ericsson.se> <369e309a.32671759@news.demon.co.uk> <369F0592.94F9DDDA@dresdner-bank.com> <77pnr4$ch3$1@newnews.global.net.uk> <36a3281a.11980677@news.demon.co.uk> <77vclp$rme@news3.euro.net> <36a34176.18473393@news.demon.co.uk> <77vi92$944@news3.euro.net> <36a357bb.24173519@news.demon.co.uk> <7803e9$825$1@nnrp1.dejanews.com> X-Accept-Language: en Content-Type: text/plain; charset=iso-2022-jp Organization: Matsushita Electric Works, Ltd. Mime-Version: 1.0 Newsgroups: comp.lang.ada,comp.lang.c++,comp.vxworks,comp.lang.java Date: 1999-01-19T00:00:00+00:00 List-Id: robert_dewar@my-dejanews.com wrote: > > In article <36a357bb.24173519@news.demon.co.uk>, > johnb@invision.co.uk wrote: > > > No, it does not! The temporary objects created above are > > as a result of calls to an object constructor. There is > > no parallel in C to a constructor. The only stack usage > > in C results from function calling. > > This is complete nonsense, and your insistence on this > completely wrong model just emphasizes that you do not > know what is going on here. The stack is used for many > things, including alloca calls, function local variables, > block local variables, register spill, saving of > non-volatile registers, including the frame pointer ... > > You really should (a) learn assembly language and (b) study > the assembler output from a C compiler. > > It amazes me how many people today write in a high level > language and haven't the foggiest idea what is going on > at the code generation level! Don't be so rude to today's people ;-). Albeit I am aware of low level generation matters (I first used Z80 assemby 17 years ago, then Pascal, C, C++ and today C++/Java), I think it's only natural to have more and more people ignoring these. That's only the result and purpose of high level languages and software development means: to accumulate experience and provide ever more powerful tools to avoid re-implementing the same things ever and ever. That's the way C++ goes with STL: C-arrays and loops are now almost obsolete ; in many cases you don't need to know how things go on, you just do it and rely on the language and compiler to implement it in a nice way. For example I was amazed to see how fast a colleague of mine developed a nice windowing application with Visual Basic. I wouldn't have done it that fast with C++ for example (thought maybe with Java). Well, unfortunately real life isn't that beautiful so I still have to look at assembly to check the actual code generation in some cases (only parts of embedded softwares that are worthy to optimize), but I hope I will get rid of this sometimes. -- Laurent Safa Matsushita Electric Works, Ltd.