Article View: comp.object.corba
Article #24Re: extensible structs/interoperability
From: Philip Lijnzaad
Date: Thu, 29 Jun 2000 00:00
Date: Thu, 29 Jun 2000 00:00
61 lines
3450 bytes
3450 bytes
Martin> In article <u71z1icf9a.fsf@o2-3.ebi.ac.uk>,
Martin> Philip Lijnzaad <lijnzaad@ebi.ac.uk> wrote:
>> this is essentially the same as your struct ...
Martin> No. The essential difference is that you can access a valuetype
Martin> on the language level in a polymorphic way, whereas you have to
Martin> unpack an any in a much more complicated procedure. Please note
Martin> that the subject is "extensible structs" - valuetypes are the
Martin> interoperable version of that, not the any type.
exactly: I am not talking about anys here; you were suggesting to have
valuetype item{
public string key;
public ValueBase value;
}
how does this differ from
struct item{
string key;
any value;
}
apart from the fact that you can extend the valuetype?
Let's not confuse 'extendible structs' (for want of a better term) with hash
tables, even though Perl equates the two (since you can always add something to
your hash^H^H^H^HPerl object by $obj->{more} = q(I'm an extension of $obj)
Martin> valuetype hash{
Martin> private sequence<item> items;
Martin> public ValueBase get(in string key);
Martin> public void set(in string key, in ValueBase value);
Martin> };
>>
>> ... and this is essentially the same as your interface, with the added
>> inconvenience that the client will have to implement get and set, and that
>> transmitting all the items maybe impossible due to bandwidth ...
Martin> No. The essential difference is that all invocations will be local,
Martin> as opposed to being remote - which is an essential difference if
Martin> you have a large number of items.
exactly: transmitting the hashes, if they're big, may not be the right thing
to do.
I guess I'm confused as to what the original poster wanted: extendability
(offered by vendors-specific stuff such as extendible structs, or by using
valuetype inheritence, or hacks such as XML or anys), OR hash tables.
Philip
--
Ban GM foods! Long live the Mesolithicum, pesticides and starvation
-----------------------------------------------------------------------------
Philip Lijnzaad, lijnzaad@ebi.ac.uk \ European Bioinformatics Institute,rm A2-24
+44 (0)1223 49 4639 / Wellcome Trust Genome Campus, Hinxton
+44 (0)1223 49 4468 (fax) \ Cambridgeshire CB10 1SD, GREAT BRITAIN
PGP fingerprint: E1 03 BF 80 94 61 B6 FC 50 3D 1F 64 40 75 FB 53
Technical Details
Message-ID:
<u7pup1bdoq.fsf@o2-3.ebi.ac.uk>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<8jc0ms$nqt$1@slb6.atl.mindspring.net> <8jc8pu$6d6$1@news.cs.tu-berlin.de> <u71z1icf9a.fsf@o2-3.ebi.ac.uk> <8jdq3d$m6n$1@news.cs.tu-berlin.de>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 108bbb,222a36e4c2f8e995 X-Google-Attributes: gid108bbb,public X-Google-Thread: f753e,222a36e4c2f8e995 X-Google-Attributes: gidf753e,public X-Google-Thread: 10b07f,222a36e4c2f8e995 X-Google-Attributes: gid10b07f,public From: Philip Lijnzaad <lijnzaad@ebi.ac.uk> Subject: Re: extensible structs/interoperability Date: 2000/06/29 Message-ID: <u7pup1bdoq.fsf@o2-3.ebi.ac.uk> X-Deja-AN: 640187397 References: <8jc0ms$nqt$1@slb6.atl.mindspring.net> <8jc8pu$6d6$1@news.cs.tu-berlin.de> <u71z1icf9a.fsf@o2-3.ebi.ac.uk> <8jdq3d$m6n$1@news.cs.tu-berlin.de> X-Complaints-To: news@net.bio.net X-Trace: niobium.hgmp.mrc.ac.uk 962234108 12109 193.62.196.201 (28 Jun 2000 23:15:08 GMT) Organization: EMBL Outstation Hinxton - European Bioinformatics Institute, UK NNTP-Posting-Date: 28 Jun 2000 23:15:08 GMT Newsgroups: comp.object.corba,comp.lang.java.corba,borland.public.jbuilder.corba-rmi