From: Jacob Sparre Andersen <jacob@jacob-sparre.dk>
Subject: Re: feedback asked on dab-decoder software in Ada
Date: Thu, 15 Sep 2016 11:00:08 +0200
Date: 2016-09-15T11:00:08+02:00 [thread overview]
Message-ID: <87oa3ph71j.fsf@adaheads.sparre-andersen.dk> (raw)
In-Reply-To: 52cfa89e-7e4f-48f6-93b4-d559ea001d82@googlegroups.com
Jan van Katwijk wrote:
> This summer I wanted to learn Ada (again, after a period of well over
> 20 years) and I made a reimplementation of the DAB software in Ada.
Sounds like an ambitious project.
> I would like to get some feedback on the use of the Ada language.
Some comments and questions:
+ It would make it easier to get contributions from other Ada
developers, if you switched source style to something closer
to what is suggested by the Ada Quality and Style Guide [1].
+ Why do you put the package specifications in a separate directory?
+ You might benefit from running your compiler with more warnings
enabled.
+ A package body doesn't have to "with" itself.
+ There are no guarantees that "Integer" in Ada is the same as "int" in
C. If you need a C "int", you should use "Interfaces.C.int".
+ Are you sure you need as many access types as you declare? (It looks
- understandably - a bit like you are writing C in Ada.)
+ It looks like you aren't getting as much out of the type system as you
could. (A length should probably not be able to contain negative
values. - Just to take a single example.)
> Any feedback and suggestions for improvement (it definitely runs
> slower than the C++ version) is welcome
I would suggest that you postpone the performance improvements a bit,
and focus on getting more out of Ada.
Greetings,
Jacob
[1] http://www.adaic.org/resources/add_content/docs/95style/html/cover.html
--
"For there are only two reasons why war is made against a
republic: The one, to become lord over her: the other, the
fear of being occupied by her." -- Nicolo Machiavelli
next prev parent reply other threads:[~2016-09-15 9:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-18 9:00 feedback asked on dab-decoder software in Ada jan van katwijk
2016-09-15 9:00 ` Jacob Sparre Andersen [this message]
2016-09-24 17:45 ` jan van katwijk
2016-09-24 18:38 ` jan van katwijk
2016-09-24 21:27 ` G.B.
2016-09-25 10:44 ` jan van katwijk
2016-09-25 9:04 ` Simon Wright
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox