Re: Multiple includes (was: Rob's going to hate me... (Remainder bug))
- Posted by Irv Mullins <irvm at ellijay.com> Nov 10, 2003
- 576 views
On Monday 10 November 2003 12:12 pm, you wrote: > > Hello there Irv, > > Dont get me wrong, i like your idea too, but you have to > remember there is code out there written by someone who > likes to use the alias feature, where you can use two > different namespace prefixes with the same file: > > include MyFile.e as MF > include MyFile.e as MyFile > > and now you can use either MF or MyFile to > access data in MyFile.e . So, when reading your code, I see a reference to MF:x = 2, and elsewhere one to MyFile:x = 3. What is there to indicate that they are both addressing the same variable? And, if you used MF because it was shorter/easier to type, why didn't you use it throughout the code? Got tired of typing the long form, and changed in midstream? No thanks, I have enough trouble keeping up with variables without them masquerading as something else part of the time. This goes so against Rob's philosophy that I'm amazed he allows it. I also doubt that anyone has used it much, because programming is confusing enough already. > This 'feature' cant be lost just because something else > is added, can it? Sure, especially because it's not a feature (except in the Microsoft sense). It's a bug. Bugs can be tossed out anytime. If there's some way that aliases for variables might actually be useful, then an 'alias' keyword should be added. > Personally i have only used this once i think, but > there is also this to think about(which i've used a > few times already): > > --all same file..."Colors.ew" > include Colors.ew as Colors > constant Blue=Colors:GetBlue() > > This works fine right now, so i should think it should still > work the same after the change. I suppose it would. Is this the same as local:GetBlue() would be in some other languages? Meaningless except to clarify the code? Irv