From: Paul Brannan Date: 2002-02-20T03:13:57+09:00 Subject: Re: Rinn and Perl CORBA::ORBit On Wed, Feb 20, 2002 at 02:07:55AM +0900, Anders Selander wrote: > _narrow closes in the object on one particular interface of the current > idl, right? It is a downcast from a base type to a derived type. > What if it is, as in my case, only one interface defined in the idl > altogether? Should it really be required then? It seems to me like it should be unnecessary for a dynamic language like Ruby. For a language like C++, though, where references themselves have a type (contrast this to Ruby where references have no type, but objects always know their own type), _narrow is always necessary. > Another interesting restriction is that the argument to _narrow need to > be a constant, thus I had to change the module name in my idl from > lowercase to uppercase, and consequently also in the Perl code for the > server object. (That it was lowercase in the first place was because it > was so in the original Perl-ORBit example I found on the web and which > I still am deriving new examples from.) IDL is case-sensitive, but does not allow two identifiers that differ only in case. In Ruby, all class names are constants, and constants always begin with an uppercase letter. IMHO, the ORB should always interpret IDL files as if the first letter were uppercase; CORBA was designed so that this could be possible. > Last, but not least, I do not like using methods (or functions) > beginning with an underscore as they, to me, indicate that it is a > hidden or internal method that I really should not know about. It is > the same thing with Perl's CORBA::ORBit _get_the_POAManager method. > Does anybody else feel the same? Or is it just me that have failed to > appreciate some small but important difference between the > namingconventions of Ruby/Perl and C? ;-) Complain to the OMG. It's a CORBA thing. Paul