comp.lang.ada
 help / color / mirror / Atom feed
From: anon@anon.org (anon)
Subject: Re: Problem using Ada.Text_IO.Modular_IO
Date: Sun, 13 Jul 2008 00:51:44 GMT
Date: 2008-07-13T00:51:44+00:00	[thread overview]
Message-ID: <Akcek.225781$SV4.183801@bgtnsc04-news.ops.worldnet.att.net> (raw)
In-Reply-To: 4878820c$0$27451$9b4e6d93@newsspool4.arcor-online.net

Back when there were widely use hardware with different word sizes you 
would need to define the type.  But before Microsoft, the computer world 
decides to use base 2 in the following formats 8/16/32/64/128/256 
with each having different problems of access time based on the cpu 
and data sizes.. In other words a 32-bit system has a faster time 
accessing a 32-bit word than accessing a 8-bit word. And has to use 
extra routines to simulate a 5-bit words instruction or data size.

Plus, when a programmer defines their own type in Ada, Ada adds 
extra set of routines that are not based in hardware checks but software,
which slows a program down. And when you are using sometime like 
"mod 2**64" which is pre-define as Unsigned_64 which can be 
hardware check (because it is a full 64-bit word) why would any 
programmer add a user defined type that would slow their program down 
for no reason other than to waste time, both in programming/debugging 
and execution time. And as any boss will tell you time is money and money 
is the bottom line.  Or in the Gaming world the more time it take the 
more likely player will lose the game and the player will lose interest in 
the game, and stop buying the programmers game. etc. So, TIME is still a 
big factor to programmers.

And as for defining types and let the compiler add the vendors verification 
routines, should ONLY happen in the classroom.  If programmere define a 
type then they should define how and where the verification will take place 
not the compiler. Aka using Ravenscar type of programming. But for most 
programmers it seams,  Ravenscar type of programmere is just too hard to 
use. But once you start using Ravenscar you will never go back to the old 
ways.

In <4878820c$0$27451$9b4e6d93@newsspool4.arcor-online.net>, Georg Bauhaus <see.reply.to@maps.futureapps.de> writes:
>anon wrote:
>> But like the rest you miss the point.  "KNOW and USE your Ada System and 
>> stop wasting time reventing types or routines!"  And USE as much of the 
>> system as you can or it may not be there tomorrow, when you really need it!"
>
>The other point is that using an Ada system well means to know
>the Ada fundamental type system. Start thinking about the types
>that your program needs.  Most of the time this means, avoid
>the predefined "vague" types, they are overly inclusive types,
>not specific to the task at hand and hence convey little meaning.
>You get the same speed if you define your own types, (re)using
>the Ada fundamental type system.
>
>If interfacing to hardware, or to other languages, use types from
>the Interface hierarchy.
>
>-- 
>Georg Bauhaus
>Y A Time Drain  http://www.9toX.de




  reply	other threads:[~2008-07-13  0:51 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-09 16:52 Problem using Ada.Text_IO.Modular_IO jujosei
2008-07-09 19:03 ` Anh Vo
2008-07-09 19:22   ` Adam Beneschan
2008-07-09 21:50 ` Adam Beneschan
2008-07-10 15:00   ` jujosei
2008-07-10  0:48 ` anon
2008-07-10  1:52   ` Adam Beneschan
2008-07-10  7:25     ` anon
2008-07-10 14:59       ` Adam Beneschan
2008-07-11  0:34         ` anon
2008-07-11  9:49           ` Georg Bauhaus
2008-07-11 10:05             ` christoph.grein
2008-07-11 13:21               ` John McCormick
2008-07-11 12:16             ` anon
2008-07-11 13:26               ` petter_fryklund
2008-07-11 21:10                 ` anon
2008-07-12 10:06                   ` Georg Bauhaus
2008-07-13  0:51                     ` anon [this message]
2008-07-13 16:03                     ` Georg Bauhaus
2008-07-14  2:03                       ` anon
2008-07-14 13:12                         ` Georg Bauhaus
2008-07-16  6:16                           ` micronian2
2008-07-16  7:47                             ` anon
2008-07-17 16:33                               ` micronian2
2008-07-14 16:34                       ` micronian2
2008-07-14 17:26                         ` Georg Bauhaus
2008-07-16  6:28                           ` micronian2
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox