comp.lang.ada
 help / color / mirror / Atom feed
From: "Alex R. Mosteo" <devnull@mailinator.com>
Subject: Re: Problem with -gnatt
Date: Tue, 19 Oct 2004 17:46:38 +0200
Date: 2004-10-19T17:46:38+02:00	[thread overview]
Message-ID: <417536DE.3060405@mailinator.com> (raw)
In-Reply-To: <41752742$0$91006$39cecf19@news.twtelecom.net>

Matthew Heaney wrote:
> "Alex R. Mosteo" <devnull@mailinator.com> wrote in message 
> news:4174BF2F.8050306@mailinator.com...
> 
>>Matthew Heaney wrote:
>>
>>>The Control_Type certainly *will* prevent such mistakes.
>>
>>I think he refers to *locking* and not *unlocking* which is, BTW, my 
>>principal objection too.
> 
> 
> We're not talking generalities here.  We're talking about a very specific 
> piece of code.  In that piece of code, you "remembered" to write the http 
> logging feature as a protected action.  If you can remember to do that, then 
> surely you can "remember" to call a semaphore! What's the difference?

I coulnd't forget to write that as a protected procedure, since the data 
reported is protected. If I must read it, I must do it inside the 
protected procedure. If I unprotect that collection and start using 
semaphores, nobody will warn me when I forget that a lock is to be 
honored. Furthermore, a second reviewer/coder could easily not notice 
that a lock is required around accesses to that data, or miss a comment 
about it.

> My advice is to stop fighting the language...

And I see your point. It's simply that I don't see the big damage in 
what I'm doing. It's an advice. My service isn't that long. The 
collection will hold at worst a hundred elements.

Maybe I'm abusing the language, but surely not fighting against it 
(IMO). It's not like I were making unchecked_conversions or taking 
'Unrestricted_references all over the place and going the C way. It's 
simply that I prefer a protected than a semaphore. Let's assume said 
report costs a whole one second worst case. The user uses it a couple 
times each hour. And let's assume there are a lot of protected, short 
procedures, that also access that collection. Clearly start using 
semaphores is going down the abstraction level path, and looking for 
problems.

The bottom line is: I'm only degrading the performance abusing the 
protected construction? Or could I get erroneous execution? If there's 
nothing suggesting the later (which I don't believe or I wouldn't be 
arguing about it), I find the cost worth it.



  reply	other threads:[~2004-10-19 15:46 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-07 10:40 Javadoc-like for Ada Alex R. Mosteo
2004-10-07 11:46 ` stephane richard
2004-10-07 13:05   ` Marc A. Criley
2004-10-07 13:39     ` Alex R. Mosteo
2004-10-07 16:51       ` Problem with -gnatt (was Re: Javadoc-like for Ada) Alex R. Mosteo
2004-10-07 18:43         ` Marc A. Criley
2004-10-07 20:07           ` Björn Persson
2004-10-08  8:40           ` Alex R. Mosteo
2004-10-07 19:21         ` Problem with -gnatt Ludovic Brenta
2004-10-08  8:45           ` Alex R. Mosteo
2004-10-08  9:43             ` Martin Dowie
2004-10-08 13:09               ` Alex R. Mosteo
2004-10-09 14:17                 ` Stephen Leake
2004-10-15 20:11                   ` Matthew Heaney
2004-10-18  7:59                     ` Alex R. Mosteo
2004-10-08 16:52             ` Ludovic Brenta
2004-10-09 14:16             ` Stephen Leake
2004-10-09 14:45               ` Jeff C r e e.m
2004-10-10 12:25                 ` Ludovic Brenta
2004-10-10 14:42                 ` Stephen Leake
2004-10-15 20:03               ` Matthew Heaney
2004-10-16 13:16                 ` Stephen Leake
2004-10-15 20:00             ` Matthew Heaney
2004-10-15 20:06             ` Matthew Heaney
2004-10-18  7:59               ` Alex R. Mosteo
2004-10-18 16:48                 ` Matthew Heaney
2004-10-18 18:21                   ` Alex R. Mosteo
2004-10-19  0:20                     ` Matthew Heaney
2004-10-19  2:41                       ` Brian May
2004-10-19  3:08                         ` Matthew Heaney
2004-10-19  7:15                           ` Alex R. Mosteo
2004-10-19 14:52                             ` Matthew Heaney
2004-10-19 15:46                               ` Alex R. Mosteo [this message]
2004-10-19 20:03                                 ` Matthew Heaney
2004-10-19 20:38                                   ` Alex R. Mosteo
2004-10-23  6:28                                   ` Brian May
2004-10-24  5:45                                     ` Jeffrey Carter
2004-10-24  8:54                                       ` Dmitry A. Kazakov
2004-10-20  1:20                         ` Jeffrey Carter
2004-10-20 14:48                           ` Matthew Heaney
2004-10-19  7:36                       ` Alex R. Mosteo
2004-10-20  5:19                         ` Simon Wright
2004-10-20  7:59                           ` Alex R. Mosteo
2004-10-11 22:53 ` Javadoc-like for Ada Lionel Draghi
  -- strict thread matches above, loose matches on Subject: below --
2004-10-20  1:34 Problem with -gnatt Stephen Leake
2004-10-20  6:37 ` Matthew Heaney
2004-10-20  9:19 ` Pascal Obry
2004-10-20 13:22 Stephen Leake
2004-10-20 15:08 ` Pascal Obry
2004-10-20 16:23   ` Alex R. Mosteo
2004-10-20 16:38     ` Pascal Obry
2004-10-20 20:05       ` Alex R. Mosteo
2004-10-23 20:12       ` Niklas Holsti
replies disabled

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