comp.lang.ada
 help / color / mirror / Atom feed
From: "Vasiliy Molostov" <molostoff@gmail.com>
Subject: Re: Little people supporting Ada, possibly through AdaCore?
Date: Sat, 21 Jul 2012 21:04:28 +0400
Date: 2012-07-21T21:04:28+04:00	[thread overview]
Message-ID: <op.whs21qn5ka8ora@aspire.local> (raw)
In-Reply-To: juah2s$gc2$1@munin.nbi.dk

This is true for a complete library interface which is offered to the  
user. I doubt that it can be handful.

In the reply, I meant intermediate interface models, which user can  
aggregate to get that of his interest, which is more flexible way.

Any complete and strong defined interface comes with restrictions, and not  
all of them can be adopted without compromise, and mandatory ordering of  
some sort where you can not avoid it is a potential point of expectation  
mistake. Especially where it has environment dependencies (for example,  
character encoding, locale settings and so on).

Looking over a superset of all possible sorts of the behaviour of that  
interface implementation, I am as a user can say that this order is  
unknown to me, since interface has no definition about it, and  
consequently - unknown order falls back to "no order", which means I have  
to reorder it by my own implementation, e.g. override.

What part of that interface I can override?

ps. Sorry, perhaps I am arguing without referring to initial questioned  
problem, I have just responded about "unordered sets are impossible".

Randy Brukardt <randy@rrsoftware.com> писал(а) в своём письме Fri, 20 Jul  
2012 06:51:05 +0400:

> "Vasiliy Molostov" <molostoff@gmail.com> wrote in message
> news:op.whoz7g1gka8ora@aspire.local...
> ...
>> I suppose that for user an unknown order means no order.
>
> Not really. There are many, many examples of programmers taking  
> advantage of
> a order that a particular implementation has. As Dmitry points out, it's
> important that the interfaces expose as little order as possible.
>
> This is, in fact, the reason that we ultimately decided that Ada  
> shouldn't
> have unordered maps and sets. The implementation would necessarily  
> iterate
> the maps and sets in some order, and it seemed impossible to prevent code
> from depending on that order. Moreover, lookups in a truly unordered map  
> or
> set are expensive (requiring looking at the complete contents of the map  
> or
> set), and there seemed to be no significant performance advantage to the
> unordered forms over the other forrms.
>
> Of course, the iteration order of a hashed map is unknown and should not  
> be
> depended upon, but that doesn't stop people from trying (as in the OP).
> Probably, unordered containers shouldn't allow any iteration, but that's
> obviously limiting.
>
>                                          Randy.
>
>
>


-- 
Написано в почтовом клиенте браузера Opera: http://www.opera.com/mail/



  reply	other threads:[~2012-07-26 15:29 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-04 13:26 Little people supporting Ada, possibly through AdaCore? Patrick
2012-05-04 14:36 ` Marc C
2012-07-16 15:47   ` Adrian Hoe
2012-07-16 18:13     ` Marc C
2012-07-17  1:58       ` Adrian Hoe
2012-07-17  6:00         ` Thomas Løcke
2012-07-17 13:47           ` Adrian Hoe
2012-07-17 15:06             ` Thomas Løcke
2012-07-18 13:33             ` Marc C
2012-07-18 17:14               ` Dmitry A. Kazakov
2012-07-18 17:49                 ` Simon Wright
2012-07-18 20:57                 ` Vasiliy Molostov
2012-07-19  8:08                   ` Dmitry A. Kazakov
2012-07-19 12:12                     ` Vasiliy Molostov
2012-07-19 13:22                       ` Georg Bauhaus
2012-07-21 17:01                         ` Vasiliy Molostov
2012-07-20  2:51                       ` Randy Brukardt
2012-07-21 17:04                         ` Vasiliy Molostov [this message]
2012-07-19  7:45                 ` Maciej Sobczak
2012-07-19  8:23                   ` Dmitry A. Kazakov
2012-07-19 12:42                     ` Maciej Sobczak
2012-07-19 14:05                       ` Dmitry A. Kazakov
2012-07-19  1:01             ` gautier_niouzes
2012-05-04 17:55 ` Manuel Gomez
2012-05-04 19:59   ` okellogg
2012-05-05 17:13     ` Simon Wright
2012-05-06 16:26       ` okellogg
2012-05-06 16:42         ` Yannick Duchêne (Hibou57)
2012-05-06 16:55           ` Simon Wright
2012-05-06 17:21             ` Yannick Duchêne (Hibou57)
2012-05-06 19:33               ` Simon Wright
2012-05-20 13:38         ` okellogg
2012-05-05 14:17   ` Marco
2012-05-06 13:01     ` Lucretia
2012-05-04 19:28 ` gautier_niouzes
2012-05-05 13:28   ` Pascal Obry
replies disabled

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