Re: Real Time IO routines answering Simon Wright part 2




In 1990's, NYU/Adacore and others suggested this at a conference and
the Ada committee voted this and a few other standards for the
Ravenscar profile. And a few vendors even coded this into their
Ravenscar profile for their compilers. (GNAT 3.00 had it embeded in the
compiler)

From the information of the Ada committee, this was also suggested
that it become apart of the next specification amendment to Ada. That
would have been in the updated Ada 95 standard "ISO/IEC 8652:1995(E)
with Corrigendum 1 and Amendment 1" back in 2001.

What happen well I think it was the DOD and 1998 that killed the idea.
Europe was one who do not like some of the Ada committee new standards,
so when the US government pulled out, so did those standards including the
new coding practices.

Just like some follow the "Ada coding style guide", some do not. The
only one that GNAT follows to letter is the spacing, which makes some
of the code hard to read. But the rule on limiting comments, well just
look at some of GNAT specifications. If you say that they followed that
rule well than I will be the next Pres of the US. Since the style in not
enforce in the compiler like others languages then why follow them. For
GNAT it is enforce by options by the programmer not the Specifications.
But I and some others like to be able to read the code and understand
what the programmer is doing and spacing with a lot of comments allow
that.

Plus, most programmer start out by believing the "Core Algorithm" is the
most important part of a partition. But as any published programmer will
tell you that "Documentation" is number one, followed by the "User
Interface" and the last item is the "Core Algorithm". A published
programmer will also tell any programmer that the "User Interface"
should take about 75% of the coding time while the "Core Algorithm"
should take less than 5%.

And even though Ada has no real GUI in the specification it does have
some. Rather the data is printed to the monitor or to a printer, the user
(or teacher in the case of students) wants to be able to read the results
without eye stain and in a timely fashion, that is, only the valid
significant data. Which means that a programmer has to formatted
their outputted data in a fashion that is informative but not too much
that it causes confusion or stain in the user.


And any 19 year programming vet. should knows this!!! And to allow a
student to believe differently is just wrong. Unformatted output and bad
programming practices should never be allowed in code, except as a
teaching tool, with documentation that states this. Even if the statement
is legal, those techniques and statements are for DEBUGGING ONLY. No
one else should see unformatted data except for the programmer, while
testing his "Core Algorithm".


Leaving you with the idea. Which would you per to look at or read for 8
hours a day:

This " 11938588250.273822028" or this "250.273" for relative
information.

Or would you like the TAX man to see that you have:

588200.797647034 and reads it as 588288.88 because of eye stain
or reads it as 588_200.79 or even 588,200.79 which is correct.

Note: .88 is the number is rounded to .80 and the 88s because
of eye stain. After a while '0' can look like '8'.

And in both cases the unformatted output will get the programmer
fired.



In <1193844955.601875.108200@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>, Adam Beneschan <adam@xxxxxxxxxx> writes:
On Oct 30, 9:35 am, a...@xxxxxxxx (anon) wrote:

-- Where did I get the information that IMAGE should be use for
-- debugging only? A few Ada conferences back in the early to
-- mid 1990's dealing with Ada programming and debugging
-- techniques.

To be precise, that should be called "opinion", not "information".
OK, so I wasn't at the conferences you mention, so I really don't know
how this "information" was presented or what the context was. There
may have been reasons for discouraging its use---the secondary stack
may be one reason; another possible reason is that less-experienced
programmers were prone to misuse 'Image. Or it could have been due to
efficiency concerns with passing unconstrained arrays around. Or it
could have just been someone's personal idea about what Ada was
"supposed" to be. Of course, there is no shortage of people who have
difficulty distinguishing their own opinions from factual
information.

If the "information" was that there was a consensus in the Ada
community that 'Image was to be avoided, maybe that was true---I don't
know---but on the other hand, I suspect that if it were true then
'Image wouldn't have been expanded. In Ada 83, you could not use
'Image on floating or fixed-point types; in Ada 95, this capability
was added. It would seem a little odd for those who decided on what
would be added to Ada 95---who are about as far from "newbie" as you
can get---to add this feature if there was a consensus that 'Image was
a bad thing. Also, the responses on this thread (from people with a
lot of Ada experience) seem to indicate that there is no such
consensus.

Anyway, I can imagine that 'Image may be misused sometimes, and that
some people felt it should be discouraged. But it's a big jump to go
from there to the absolute statements you made that Ada purists
"NEVER" use it, or that it is never used except for debugging, or that
practically only newbies use it. Those statements are still nonsense.

-- Adam



.



Relevant Pages

  • Re: Making money on open source, if not by selling _support_, then how?
    ... OTOH, if these dishwashers are qualified physicists, such an effort ... If you're so specialized in Ada ... selection does not happen. ... Who's to prevent a qualified programmer from producing open source? ...
    (comp.lang.ada)
  • Re: String filtering
    ... >> language like Ada. ... > I think the programmer, not the language designer, should make such ... > programmer) from doing bad things by accident. ... > restrictive rules that try to prevent me from doing things I ...
    (comp.lang.ada)
  • Re: [OT] Re: Teaching new tricks to an old dog (C++ -->Ada)
    ... In fact, Ada is ... If you disregard the controversial "export" keyword, most recent compilers ... I would expect a programmer to know the ... > It is a mistake to assume that the programmer makes no mistakes. ...
    (comp.lang.cpp)
  • Re: [OT] Re: Teaching new tricks to an old dog (C++ -->Ada)
    ... In fact, Ada is ... If you disregard the controversial "export" keyword, most recent compilers ... I would expect a programmer to know the ... > It is a mistake to assume that the programmer makes no mistakes. ...
    (comp.lang.ada)
  • Re: Learning Ada (Was: unsigned type)
    ... true Standards that go beyond Ada. ... An example that is listed in the Ada RM, ... standard package, but for a single package or routine it better to create a new ... basic standards of the universal-integer and universal-real aka CPU integer ...
    (comp.lang.ada)