2016-02-25 15:25 GMT+01:00 Clément Bera <[email protected]>: > > > 2016-02-23 18:03 GMT+01:00 Eliot Miranda <[email protected]>: > >> >> >> On Tue, Feb 23, 2016 at 12:47 AM, stepharo <[email protected]> wrote: >> >>> Hi >>> >>> I saw that something <return: #Point> or <return: Point> >>> I do not know why but I have the impression that <return: #Point> is >>> better. >>> Because we may have code not present and still want to load the code. >>> >> >> Given the current semantics of pragmas only <return: #Point> is valid. >> > > Well, yes... > > In fact, Opal compiles <return: Point> as <return: #Point>. It does not > change the semantics. > > I think the real question is: "Do we allow, in the specific case of > pragma, symbols to by written without the # ?" >
I am about to change this (with the exception for <primitive:...error:>) 17696 <https://pharo.fogbugz.com/f/cases/17696/RBParser-should-not-allow-variable-names-for-pragma-arguments> RBParser should not allow variable names for pragma arguments > > We already allow "[ nil ]" to be written as "[ ]", and the "^self" at the > end of each method to be omitted. We could have more specific cases so it > won't be too trivial for unaware people to understand the semantics. > > We can already see that the syntax colorer is not aware of this specific > case, so it colors Point in <return: Point> as a Literal Variable instead > of a symbol, which leaded many people here to confusion. > > *About renaming...* > > When renaming a class, it checks all the symbol references too, so, > assuming you have a class Banana and the following code: > > Coconut >> getSomething > <return: Banana> > <return: #Banana> > Banana new. > ^ #Banana > > When we rename the class Banana to Cauliflower, the method is > automatically changed to: > > Coconut >> getSomething > <return: #Cauliflower> > <return: #Cauliflower> > Cauliflower new. > ^ #Cauliflower > > Again, in this case, as for syntax coloring, the system is not aware that > it should rename <return: Banana> to <return: Cauliflower> and not > <return: #Cauliflower>, so as it uses standard symbol terminology > > > > >> _,,,^..^,,,_ >> best, Eliot >> > >
