From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e6622c2c0e563df2,start X-Google-Attributes: gid103376,public From: Andre Spiegel Subject: Standard library and distributed systems Date: 1997/07/02 Message-ID: #1/1 X-Deja-AN: 254039748 Sender: spiegel@moon Organization: Freie Universitaet Berlin X-Access: 16 17 19 Newsgroups: comp.lang.ada Date: 1997-07-02T00:00:00+00:00 List-Id: Last week I posted an article concerning distributability of types in Ada's standard library. There were no replies, so here is a second try, hopefully a bit clearer. The problem: Ada.Strings.Bounded and Ada.Strings.Unbounded are not Remote_Types packages, which means that you cannot use bounded or unbounded strings for interpartition communications in a distributed system. Since these types are very important, I find this a severe restriction for distributed programming in Ada, and I wonder whether this could be changed. There is a proposal, documented in Ada Issue ai-00126 to make all standard packages Remote_Types for which it is possible. But even under this proposal, Ada.Strings.Bounded and Ada.Strings.Unbounded remain non-remote. (1) Ada.Strings.Bounded cannot be Remote_Types because it depends on Ada.Strings.Maps, which, according to ai-00126, cannot be Remote_Types because it declares an access-to-subprogram type, Character_Mapping_Function. I don't understand this. According to RM95 E.2.2(9), a Remote_Types package _may_ declare access-to-subprogram types. So I think that both Ada.Strings.Maps and Ada.Strings.Bounded could be Remote_Types. (2) Ada.Strings.Unbounded cannot be Remote_Types for an additional reason: it declares type String_Access. But this type is not used anywhere else in the visible part, and I recall that people have been discussing whether this declaration should be removed. If it were removed, and Ada.Strings.Unbounded privately defined Read and Write attributes for Unbounded_String, then the type could be used for interpartition communications. (3) If, for example, Ada.Strings.Bounded were Remote_Types, I cannot imagine a scenario where Ada.Strings.Maps.Character_Mapping_Function would actually be used remotely (so that the function being pointed to would actually be called across partitions). If this is correct, could it be that the language rules are too restrictive in this area? They forbid something which actually wouldn't cause any problems? Please let me know whether the above reasoning is correct. If not, please tell me why not. If it _is_ correct, is it planned to change the standard library and/or the language rules? Thanks, Andre Spiegel Free University of Berlin