comp.lang.ada
 help / color / mirror / Atom feed
* if oo programming is the roman numerals of computing why add it?
@ 2013-07-07 20:50 johannes falcone
  2013-07-08 11:01 ` Dufr
  2013-07-09  0:31 ` Adam Beneschan
  0 siblings, 2 replies; 9+ messages in thread
From: johannes falcone @ 2013-07-07 20:50 UTC (permalink / raw)


why?


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: if oo programming is the roman numerals of computing why add it?
  2013-07-07 20:50 if oo programming is the roman numerals of computing why add it? johannes falcone
@ 2013-07-08 11:01 ` Dufr
  2013-07-08 17:07   ` Pascal Obry
  2013-07-09  0:19   ` johannes falcone
  2013-07-09  0:31 ` Adam Beneschan
  1 sibling, 2 replies; 9+ messages in thread
From: Dufr @ 2013-07-08 11:01 UTC (permalink / raw)


On Sunday, July 7, 2013 10:50:54 PM UTC+2, johannes falcone wrote:
> why?

Troll !

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: if oo programming is the roman numerals of computing why add it?
  2013-07-08 11:01 ` Dufr
@ 2013-07-08 17:07   ` Pascal Obry
  2013-07-09  0:19   ` johannes falcone
  1 sibling, 0 replies; 9+ messages in thread
From: Pascal Obry @ 2013-07-08 17:07 UTC (permalink / raw)


Le 08/07/2013 13:01, Dufr a écrit :
> On Sunday, July 7, 2013 10:50:54 PM UTC+2, johannes falcone wrote:
>> why?
> 
> Troll !

For sure :) Since the first stupid message one or two days ago it was clear!

Pascal.

-- 
  Pascal Obry /  Magny Les Hameaux (78)

  The best way to travel is by means of imagination

  http://v2p.fr.eu.org
  http://www.obry.net

  gpg --keyserver keys.gnupg.net --recv-key F949BD3B


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: if oo programming is the roman numerals of computing why add it?
  2013-07-08 11:01 ` Dufr
  2013-07-08 17:07   ` Pascal Obry
@ 2013-07-09  0:19   ` johannes falcone
  2013-07-09 19:14     ` Georg Bauhaus
  1 sibling, 1 reply; 9+ messages in thread
From: johannes falcone @ 2013-07-09  0:19 UTC (permalink / raw)


On Monday, July 8, 2013 4:01:28 AM UTC-7, Dufr wrote:
> On Sunday, July 7, 2013 10:50:54 PM UTC+2, johannes falcone wrote:
> 
> > why?
> 
> 
> 
> Troll !

How dare you call me a troll.

http://harmful.cat-v.org/software/OO_programming/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: if oo programming is the roman numerals of computing why add it?
  2013-07-07 20:50 if oo programming is the roman numerals of computing why add it? johannes falcone
  2013-07-08 11:01 ` Dufr
@ 2013-07-09  0:31 ` Adam Beneschan
  2013-07-10 13:13   ` Martin
  1 sibling, 1 reply; 9+ messages in thread
From: Adam Beneschan @ 2013-07-09  0:31 UTC (permalink / raw)


On Sunday, July 7, 2013 1:50:54 PM UTC-7, johannes falcone wrote:
> why?

I don't see the point of bringing this up now, since object-oriented programming got added way back in Ada XCV.

                             -- Adam


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: if oo programming is the roman numerals of computing why add it?
  2013-07-09  0:19   ` johannes falcone
@ 2013-07-09 19:14     ` Georg Bauhaus
  2013-07-09 19:43       ` Adam Beneschan
  0 siblings, 1 reply; 9+ messages in thread
From: Georg Bauhaus @ 2013-07-09 19:14 UTC (permalink / raw)


johannes falcone <visphatesjava@gmail.com> wrote:
> On Monday, July 8, 2013 4:01:28 AM UTC-7, Dufr wrote:
>> On Sunday, July 7, 2013 10:50:54 PM UTC+2, johannes falcone wrote:
>> 
>>> why?
>> 
>> 
>> 
>> Troll !
> 
> How dare you call me a troll.
> 
> http://harmful.cat-v.org/software/OO_programming/

Luca Cardelli's article, featured on the page, has many comments
in favor of O-O, provided a language gets it right. If you read the
article, you will notice that Ada's style of O-O is very much like
Cardelli suggests it should be.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: if oo programming is the roman numerals of computing why add it?
  2013-07-09 19:14     ` Georg Bauhaus
@ 2013-07-09 19:43       ` Adam Beneschan
  2013-07-09 20:55         ` Randy Brukardt
  0 siblings, 1 reply; 9+ messages in thread
From: Adam Beneschan @ 2013-07-09 19:43 UTC (permalink / raw)


On Tuesday, July 9, 2013 12:14:05 PM UTC-7, Georg Bauhaus wrote:

> Luca Cardelli's article, featured on the page, has many comments 
> in favor of O-O, provided a language gets it right. If you read the
> article, you will notice that Ada's style of O-O is very much like
> Cardelli suggests it should be.

I read "Pitfalls of Object-Oriented Programming" (linked on the page) yesterday, and it seems his argument delves into details like memory cacheing and branch prediction.  This was a big yawner for me.  My feeling has always been that if you take all the extra nanoseconds that good programming techniques sometimes cause, you can add up all the wasted time that occurs every time the program has been run, anywhere in the world, maybe millions of times, and it still won't nearly add up to the time that would be wasted trying to track down one difficult bug caused by bad programming practice.

Then again, the author was from Sony Entertainment, so I can understand why perhaps every nanosecond might be important.  Still, a good compilation system could, in theory, make up for the time wastage that O-O or other good programming techniques could cause.  The need to break programs up into smaller subroutines and modules has been recognized for 30 or 40 years, but this can lead to small inefficiencies when code has to contain CALL instructions instead of executing the subroutine inline.  I suspect that people back then objected to this important technique for that reason.  But compilers are now able to rearrange the code to eliminate the inefficiency.  I think similar optimizations can be done for O-O techniques.  If you have an abstract type A, but the compiler can determine that the only objects in A'Class (using Ada terminology, but I mean this to apply to any language) used in the entire program all have type B, then a compiler could, in theory, rearrange the code to avoid the overhead that a dispatching call on one of A's operations would entail.  That's just one possibility; there should be others.  Don't know if any existing compiler (for any language) goes this far.

                           -- Adam 



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: if oo programming is the roman numerals of computing why add it?
  2013-07-09 19:43       ` Adam Beneschan
@ 2013-07-09 20:55         ` Randy Brukardt
  0 siblings, 0 replies; 9+ messages in thread
From: Randy Brukardt @ 2013-07-09 20:55 UTC (permalink / raw)



"Adam Beneschan" <adam@irvine.com> wrote in message 
news:a27b527a-1bbc-4b20-a22c-035cdf152fdd@googlegroups.com...
On Tuesday, July 9, 2013 12:14:05 PM UTC-7, Georg Bauhaus wrote:

>> Luca Cardelli's article, featured on the page, has many comments
>> in favor of O-O, provided a language gets it right. If you read the
>> article, you will notice that Ada's style of O-O is very much like
>> Cardelli suggests it should be.

>I read "Pitfalls of Object-Oriented Programming" (linked on the page) 
>yesterday,
>and it seems his argument delves into details like memory cacheing and 
>branch
>prediction.  This was a big yawner for me.  My feeling has always been that 
>if
>you take all the extra nanoseconds that good programming techniques 
>sometimes
>cause, you can add up all the wasted time that occurs every time the 
>program has
>been run, anywhere in the world, maybe millions of times, and it still 
>won't nearly
>add up to the time that would be wasted trying to track down one difficult 
>bug
>caused by bad programming practice.

>Then again, the author was from Sony Entertainment, so I can understand why 
>perhaps
>every nanosecond might be important.  Still, a good compilation system 
>could, in
>theory, make up for the time wastage that O-O or other good programming
>techniques could cause.  The need to break programs up into smaller 
>subroutines
>and modules has been recognized for 30 or 40 years, but this can lead to 
>small
>inefficiencies when code has to contain CALL instructions instead of 
>executing
>the subroutine inline.  I suspect that people back then objected to this 
>important
>technique for that reason.  But compilers are now able to rearrange the 
>code to
>eliminate the inefficiency.  I think similar optimizations can be done for 
>O-O
>techniques.  If you have an abstract type A, but the compiler can determine 
>that
>the only objects in A'Class (using Ada terminology, but I mean this to 
>apply to
>any language) used in the entire program all have type B, then a compiler 
>could,
>in theory, rearrange the code to avoid the overhead that a dispatching call 
>on one
>of A's operations would entail.  That's just one possibility; there should 
>be others.
> Don't know if any existing compiler (for any language) goes this far.

Janus/Ada uses a similar technique to eliminate the extra space overhead 
caused by OOP. We track down which routines are never called in a 
dispatching call and remove those from the tags, so that the dead subprogram 
eliminator that's built-into our binder can remove the subprograms. (It 
reduced the size of typical Claw programs by about 800K.)

Since we concentrated on space rather than time issues, we never made any 
attempt to improve the call overhead, but clearly a similar technique could 
be used for that. (It's a bit harder, as flow analysis would be needed.)

                                        Randy.







^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: if oo programming is the roman numerals of computing why add it?
  2013-07-09  0:31 ` Adam Beneschan
@ 2013-07-10 13:13   ` Martin
  0 siblings, 0 replies; 9+ messages in thread
From: Martin @ 2013-07-10 13:13 UTC (permalink / raw)


On Tuesday, July 9, 2013 1:31:32 AM UTC+1, Adam Beneschan wrote:
> On Sunday, July 7, 2013 1:50:54 PM UTC-7, johannes falcone wrote: > why? I don't see the point of bringing this up now, since object-oriented programming got added way back in Ada XCV. -- Adam

That may be the single best joke ever made in c.l.a... :-)

-- Martin

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-07-10 13:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-07 20:50 if oo programming is the roman numerals of computing why add it? johannes falcone
2013-07-08 11:01 ` Dufr
2013-07-08 17:07   ` Pascal Obry
2013-07-09  0:19   ` johannes falcone
2013-07-09 19:14     ` Georg Bauhaus
2013-07-09 19:43       ` Adam Beneschan
2013-07-09 20:55         ` Randy Brukardt
2013-07-09  0:31 ` Adam Beneschan
2013-07-10 13:13   ` Martin

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