On Wed, Jul 05, 2000 at 02:16:07PM +0530, Anne Srinivas wrote:
> I have to port a big app from VC++ to Palm OS.
> The application is a mapping app with lots of map data,routing and so
> on....
>
> I am at a juncture where i have to decide between c and c++.
> If u can give me any link/document/description comparing c and c++ i
> shall be
> very gratefull to u.
>
> I know that
> 1. C++ app takes more memory
> 2 .C++ app is slow on palm
>
> Are there any more reasons why we shouldn't go for c++?
Limited stack/heap space. You don't want a lot of hidden constructors
eating resources. You don't quite need to manage things yourself,
Palm's memory management is quite good, but you have to remember to
use DmWrite or do other things like locking blocks and dereferencing
handles.
In effect, it is not just more memory, but the memory you least would
want to waste, and even so, you will do a lot of things woth memory
"manually" so you lose some of the C++ advantages.
To clarify, it isn't merely that it is slower/bigger, but that you
can't easily know or control or fix the areas where things create
bloats or bottleneck - all that information hiding has a downside when
you must do optimization. So either you will rip your classes apart
to slim them down (losing the advantages of things like inheritance),
or do other wierd things (move them to a big scratchpad database)
making things harder.
I don't know how large your original program is, a small, well written
C++ app could work well. But the limits on the Palm are hard limits,
so it *must* fit.
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/