From: Brian Drummond <brian_drummond@btconnect.com>
Subject: Re: Embedded systems programmers worldwide earn failing grades in C
Date: Tue, 26 Jan 2010 00:38:17 +0000
Date: 2010-01-26T00:38:17+00:00 [thread overview]
Message-ID: <psdsl5lnr0kbgdmipabs8s7j1e1htr86kh@4ax.com> (raw)
In-Reply-To: lnr5pdzs5r.fsf@nuthaus.mib.org
On Mon, 25 Jan 2010 15:22:24 -0800, Keith Thompson <kst-u@mib.org> wrote:
>Brian Drummond <brian_drummond@btconnect.com> writes:
>[...]
>
>A better answer IMHO is:
>
> Seconds_Per_Year : constant := 60 * 60 * 24 * 365;
>
>Why specify subtype Natural if you don't need to?
Good point; it coerces the solution to be other than Universal Integer sooner
than needed.
>As I recall, the corresponding C question presented a similar issue.
>Ada does have a better solution, but only if you use it.
And that's the important point; what level of skill is needed to find the better
solution?
Clearly more than mine ;-)
But then I am, so far, just an Ada dabbler.
VHDL would have required some type specifier here; there are many similarities
between them; this is not one of them.
My feeling is that it's easier to find the right answers with Ada, but a feeling
isn't very convincing.
- Brian
next prev parent reply other threads:[~2010-01-26 0:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-20 10:50 Embedded systems programmers worldwide earn failing grades in C alexandru.chircu
2010-01-20 16:46 ` Alex R. Mosteo
2010-01-20 20:48 ` Keith Thompson
2010-01-21 10:09 ` Alex R. Mosteo
2010-01-21 21:54 ` Keith Thompson
2010-01-25 1:32 ` Brian Drummond
2010-01-25 23:22 ` Keith Thompson
2010-01-26 0:38 ` Brian Drummond [this message]
2010-01-26 14:09 ` stefan-lucks
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox