From: Mark M. <mie...@gm...> - 2013-11-24 17:21:25
|
I'm good with number 2. Although, I don't have a compelling need to use a digit as the first character of a class, so any of the options would be fine with me. 3DGlasses is a pretty good name. ;-) -- Mark Miesfeld On Sun, Nov 24, 2013 at 8:06 AM, Rick McGuire <obj...@gm...> wrote: > Ran into this little glitch this morning with a program I was writing. I > created a class that started with the characters "3D", and was getting an > error when i tried to instantiate it because the corresponding environment > symbol resolved to a string value. I opened bug 1212 to address this. > > One of the first things I encountered was the docs for environment > symbols, which requires that the first character not be a digit (section > 1.13.6 in the reference). So, in a sense, this is working correctly, > although with a high astonishment factor. The ::class directive does not > place any restrictions, allowing you to create classes that you can't look > up via environment symbols. For example, > > say .context~package~classes["INVALID NAME"]~new > say .3dglasses~new > > ::class 3DGlasses > ::method init > say "Creating 3D Glasses" > > ::class "invalid name" > ::method init > > say "Creating a funny instance" > > It seems like a reasonable thing to create a class name like 3DGlasses, > but the current definition of environment symbols pretty much precludes > this. I see a number of possibilities here; > > 1) Do nothing other than add some documentation to the ::CLASS directive > explaining the implications of the name choice. > > 2) Change the definition of environment symbol to a restriction on the > second character to "the remaining part of the symbol cannot be a valid > Rexx number'. > > 3) Implement restrictions on the ::CLASS directive such that the name > must be a valid environment symbol. > > I'm not terribly fond of solution 3), I'm sort of in favor of 2, but can > live with 1. > > Thoughts? > > Rick > > > ------------------------------------------------------------------------------ > Shape the Mobile Experience: Free Subscription > Software experts and developers: Be at the forefront of tech innovation. > Intel(R) Software Adrenaline delivers strategic insight and game-changing > conversations that shape the rapidly evolving mobile landscape. Sign up > now. > http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk > _______________________________________________ > Oorexx-devel mailing list > Oor...@li... > https://lists.sourceforge.net/lists/listinfo/oorexx-devel > > |