RE: namespace
- Posted by Derek Parnell <Derek.Parnell at SYD.RABOBANK.COM> Jul 09, 2002
- 498 views
This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_000_01C227AF.F06BEC80 charset=iso-8859-1 Hi Jiri, > -----Original Message----- > From: Jiri Babor [mailto:jbabor at PARADISE.NET.NZ] > > Strangely enough quite recently I tripped again over the following > aspect of the brave new world of 'improved' namespace handling: > > -- test.e > global constant a = 1 > > > -- test.ex > include test.e > ? a > constant a = 2 > ? a > > > -- output > 1 > 2 > > > Not even a simple warning about the previous instance! Is this > really desirable/acceptable behaviour? I believe that RDS is considering issuing a warning whenever a declaration overrides another one. However, which behaviour are you upset over - the missing warning or the overriding? I would like the overide functionality to continue. But I wonder if, when we get the warning message facility, the programmer could code something like ... override constant a = 2 This would do two things: Skip the message being issued and alert the reader of the code to the fact that the override is deliberate. Another point, Jiri. The style of coding you demonstrate above, seems to say that you knew that 'a' had been declared in test.e (thus the first "? a" command). You then declare another 'a', knowing that the first one existed. The problem for a code reader is then - is this second declaration a mistake or deliberate? -------------- Derek. ================================================================== De informatie opgenomen in dit bericht kan vertrouwelijk zijn en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onterecht ontvangt wordt u verzocht de inhoud niet te gebruiken en de afzender direct te informeren door het bericht te retourneren. ================================================================== The information contained in this message may be confidential and is intended to be exclusively for the addressee. Should you receive this message unintentionally, please do not use the contents herein and notify the sender immediately by return e-mail. ================================================================== ------_=_NextPart_000_01C227AF.F06BEC80 Content-Type: application/ms-tnef