Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!think.com!mintaka!ogicse!unmvax!bbx!tantalum!tom From: tom@eds.com (Tom H. Meyer) Newsgroups: comp.lang.eiffel Subject: Re: Suggestion for use of Void Summary: Void comments and a new question Message-ID: <4106@tantalum.UUCP> Date: 3 Dec 90 22:19:21 GMT References: <1037@tetrauk.UUCP> Sender: usenet@tantalum.UUCP Reply-To: tom@ozmium.UUCP (Tom H. Meyer) Organization: EDS Research Lines: 46 In article <1037@tetrauk.UUCP> rick@tetrauk.UUCP (Rick Jones) writes: >It would be far cleaner to be able to write: > > excep.Create (code, Void) ; > >A Void of course conforms to any class type, so it is syntactically valid >anywhere an object reference is required. > >This raises the interesting issue of forms such as: > > obj_ref := Void equivalent to obj_ref.Forget > > if obj_ref = Void then equivalent to if obj_ref.Void then I have often run into this problem and wished for exactly this solution. Oh, well. So much for sparking a controversy :-) >... Given the opportunity, I would in fact replace the following >as well: > > a.Create (params) a := Create A_CLASS (params) I dislike this on the grounds that it would *require* that 'Create' be a keyword. I hope to see the day when classes can have more than one creation routine and this seems to disallow it. Since you asked for some net traffic and we're talking about programming, I would like feed back on how some others out there would do the following: Suppose I have some class which which has a list of generic objects and my application needs to examine every item on the list and perform different actions based on the actual type of the items on the list. My solution is a sequence of reverse assignment attempts to, first, determine the actual type of the object, and, second, have a local object of the correct type to access the specific object's features. I've heard that this is poor style but I've never been able to see a better way to do it. Supposedly, there is some way of designing the classes so that this isn't necessary. Can anyone give me an example? tom meyer, EDS Research | If I don't see you in the future ...uunet!tantalum!tom | I'll see you in the pasture 505.345.2563 Brought to you by Super Global Mega Corp .com