paparazzi-devel
[Top][All Lists]
Advanced

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

Re: [Paparazzi-devel] Software architecture design


From: Felix Ruess
Subject: Re: [Paparazzi-devel] Software architecture design
Date: Fri, 15 Feb 2013 01:28:00 +0100

Hi,

Gautier has already pointed out some of the reasons why we are using C and not C++.

Regarding abstraction/encapsulation and ease of learning the system: I'm not really sure that C++ necessarily helps for the overall picture here...
(Keeping in mind that some of the C stuff is not well written and is being refactored whenever there is need and especially time.)

Some more personal remarks (disregarding the all the work that would be needed to convert to C++):

In C++ you have to be really careful about what functionality you use on an MCU system, but it is certainly possible and has it's benefits.
But also IMHO the potential for (accidental) screwups in C++ is much greater and my experience is that once you allow people to use advanced (C++) features, they will get used sooner or later without actually keeping the MCU constraints in mind. You end up with dynamic memory allocation where you didn't expect it, templates quickly get out of hand...

From my standpoint (and in a perfect world) we would use C++, but restrict it to a certain subset which is really beneficial for us.
So while I would like to be able to use some C++ features, I currently don't see this happening in paparazzi for two main reasons:
  1. It is a _lot_ of work and not clear if it's worth putting in all that effort to convert instead of improving code and providing new features...
  2. Some core devs prefer C over C++, and hence are not keen to put in time for 1.
In the absence of godly intervention to update our codebase in one go, it looks like in a lot of cases (e.g. driver encapsulation) incrementally writing better C code solves the problems or at least helps a lot....

Regarding python on the ground side:
There are already a few python implementations (e.g. of the messages tool, sim launcher, calibration/visualization scripts, documentation tools).
Personally I would like to see more of this, as I quite like python... but this can easily be done in parallel to the existing tools in most cases...

Cheers, Felix


On Thu, Feb 14, 2013 at 11:53 PM, Chris Gough <address@hidden> wrote:
> And of course, lets do not talk about python in a microcontroller.... xD

Other people are:

http://code.google.com/p/python-on-a-chip/

This is considered most likely choice for a new flight plan scripting
language in another autopilot (ahead of lua and squirrel). Python
syntax might be nicer to look at but that's all you get,
python-on-a-chip isn't "batteries included". The paparazzi flight
planning language is awesome.

Chris Gough

_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel


reply via email to

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