simulavr-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Simulavr-devel] Uniform the code


From: address@hidden
Subject: Re: [Simulavr-devel] Uniform the code
Date: Sat, 11 Apr 2009 15:13:32 -0700

As I understand discussion so far:
The atmega128 simulated cpu has pointers to its components.
The atmega48 simulated cpu contains its components as objects.
At least one person regards that difference as a bad idea.
The atmega48 author provided reasons for doing it his way, e.g. error checking.
He has also hinted that he is ok with the different aggregation mechanisms.
So far, I am not.
What reasons for avoiding pointers apply to the
atmega48 that do not apply to the atmega128?

If pointers are useful,
two of the reasons for avoiding them could be avoided with smart pointers.
A smart pointer could be made so that it had to be
initialized and so that its destructor deleted its target.
That said, adding a level of indirection will slow things down a bit.

BTW the simulator is not an embedded program.

--
Michael Hennebry
address@hidden
"War is only a hobby."
---- Msg sent via CableONE.net MyMail - http://www.cableone.net



reply via email to

[Prev in Thread] Current Thread [Next in Thread]