TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy


Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Jacob Sparre Andersen <[log in to unmask]>
Reply To:
Jacob Sparre Andersen <[log in to unmask]>
Thu, 23 Aug 2001 15:09:52 +0200
TEXT/PLAIN (52 lines)

> Jacob Sparre Andersen wrote:
> > I think for loops on floating point types is a mistake,
> > since the step size isn't constant.
> Constancy is desirable here ?

I think so. Can you come up with any uses, where a
non-constant step size would be acceptable?

> What do you think about enumeration, whose
> representations are specified as sparse ones ?
>  # type E is (A, B, C, D);
>  # for E use (A => 0, B => 10, C => 100, D => 1_000);

No problem. There is a difference between the representation
and the "abstract" view.

> In other words, I consider that for-loop iteration could
> be re-viewed from abstract viewpoint that "what is the
> next", 'Succ.
>  # And Floatings now have Succ.

I can see your point. Maybe this is just one of those cases,
where the programmers have to think about what they want to

> So, your mention that "difference between the requested
> and the actual resolution" would be of discussion domain
> for "what Small is".


> When we need to match the requested and the actual, we
> can specify its Small with representation clause, as you
> know.

As I had forgotten. :-)

> Am I on wrong way ?

I think you may have a good point.

Maybe the whole reason human beings came into existence was
because the Earth wanted plastic and couldn't produce it any
other way.