Hi,
Shouldn't the hasClassScope property of FAMIXMethod be declared as <derived>? It is computed from privateState just as isConstructor or declaredExceptions which are derived. Same question for timeStamp. Thanks in advance. Anne _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
No, because they (#hasClassScope and #timeStamp) are not derived properties.
See the method SmalltalkImporter>>createMethod:. This is the place where we set such properties. On Wed, Apr 3, 2013 at 5:43 PM, Anne Etien <[hidden email]> wrote: Hi, Andre Hora _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
In reply to this post by Anne Etien
No, it is not.
privateState is not a meta-model property. It is only an implementation issue to offer state extensions in Pharo. Cheers, Doru On Apr 3, 2013, at 5:43 PM, Anne Etien <[hidden email]> wrote: > Hi, > > Shouldn't the hasClassScope property of FAMIXMethod be declared as <derived>? It is computed from privateState just as isConstructor or declaredExceptions which are derived. > > Same question for timeStamp. > > Thanks in advance. > > Anne > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev -- www.tudorgirba.com "Presenting is storytelling." _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Thank you (both) for your answer.
In these conditions, why hasClassScope and kind are differently implemented? (kind is an instance variable of the FAMIXMethod). Except from the implementation, is there a way to differentiate properties like hasClassScope from the ones like kind? Thanks, Anne Le 3 avr. 2013 à 17:55, Tudor Girba a écrit : > No, it is not. > > privateState is not a meta-model property. It is only an implementation issue to offer state extensions in Pharo. > > Cheers, > Doru > > > On Apr 3, 2013, at 5:43 PM, Anne Etien <[hidden email]> wrote: > >> Hi, >> >> Shouldn't the hasClassScope property of FAMIXMethod be declared as <derived>? It is computed from privateState just as isConstructor or declaredExceptions which are derived. >> >> Same question for timeStamp. >> >> Thanks in advance. >> >> Anne >> _______________________________________________ >> Moose-dev mailing list >> [hidden email] >> https://www.iam.unibe.ch/mailman/listinfo/moose-dev > > -- > www.tudorgirba.com > > "Presenting is storytelling." > > > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
In reply to this post by Tudor Girba-2
then another question: is there a logic behind the decision to use privateState or instance variables? is it to save memory (as I understood from the mooseBook: "MinimalState") But if so, is it really needed for something like a boolean (hasClassScope)? nicolas On 04/03/2013 05:55 PM, Tudor Girba wrote: > No, it is not. > > privateState is not a meta-model property. It is only an implementation issue to offer state extensions in Pharo. > > Cheers, > Doru > > > On Apr 3, 2013, at 5:43 PM, Anne Etien <[hidden email]> wrote: > >> Hi, >> >> Shouldn't the hasClassScope property of FAMIXMethod be declared as <derived>? It is computed from privateState just as isConstructor or declaredExceptions which are derived. >> >> Same question for timeStamp. >> >> Thanks in advance. >> >> Anne >> _______________________________________________ >> Moose-dev mailing list >> [hidden email] >> https://www.iam.unibe.ch/mailman/listinfo/moose-dev > -- > www.tudorgirba.com > > "Presenting is storytelling." > > > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev -- Nicolas Anquetil -- RMod research team (Inria) _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
On Wed, Apr 3, 2013 at 7:36 PM, Nicolas Anquetil <[hidden email]> wrote:
Instance variables are used for properties of the "basic" Famix meta-model. privateState are used for properties that are related to meta-model extensions such as Famix-Java, Famix-Smalltalk, Famix-Extensions, etc. Also, with privateState you can easily integrate your meta-model extension without the need to change the original meta-model (since you don't create instance variables).
For example, in FAMIXMethod we have just 2 instance variables: kind and parentType. All the other properties, which are related to meta-model extensions, use privateState.
#hasClassScope and #timeStamp for example are properties related to the Smalltalk meta-model. That's why it is better to use privateState.
Andre Hora _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
In reply to this post by Nicolas Anquetil
privateState is meant to be used for FAMIX extensions.
hasClassScope should be used through an instance variable. There is no real benefit of not having it. Could you please open an issue? Cheers, Doru On Apr 3, 2013, at 7:36 PM, Nicolas Anquetil <[hidden email]> wrote: > > then another question: > > is there a logic behind the decision to use privateState or instance variables? > > is it to save memory (as I understood from the mooseBook: "MinimalState") > > But if so, is it really needed for something like a boolean (hasClassScope)? > > nicolas > > On 04/03/2013 05:55 PM, Tudor Girba wrote: >> No, it is not. >> >> privateState is not a meta-model property. It is only an implementation issue to offer state extensions in Pharo. >> >> Cheers, >> Doru >> >> >> On Apr 3, 2013, at 5:43 PM, Anne Etien <[hidden email]> wrote: >> >>> Hi, >>> >>> Shouldn't the hasClassScope property of FAMIXMethod be declared as <derived>? It is computed from privateState just as isConstructor or declaredExceptions which are derived. >>> >>> Same question for timeStamp. >>> >>> Thanks in advance. >>> >>> Anne >>> _______________________________________________ >>> Moose-dev mailing list >>> [hidden email] >>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev >> -- >> www.tudorgirba.com >> >> "Presenting is storytelling." >> >> >> _______________________________________________ >> Moose-dev mailing list >> [hidden email] >> https://www.iam.unibe.ch/mailman/listinfo/moose-dev > > -- > Nicolas Anquetil -- RMod research team (Inria) > > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev -- www.tudorgirba.com "Things happen when they happen, not when you talk about them happening." _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
On Thu, Apr 4, 2013 at 2:48 AM, Tudor Girba <[hidden email]> wrote: privateState is meant to be used for FAMIX extensions. hasClassScope is a FAMIX extension, so why should we use instance variable?
Andre Hora _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Indeed, but I think it should not be an extension, given that it is present as a concept in any oo language.
Doru On Apr 4, 2013, at 10:41 AM, Andre Hora <[hidden email]> wrote: > > > > On Thu, Apr 4, 2013 at 2:48 AM, Tudor Girba <[hidden email]> wrote: > privateState is meant to be used for FAMIX extensions. > > hasClassScope should be used through an instance variable. There is no real benefit of not having it. > hasClassScope is a FAMIX extension, so why should we use instance variable? > > Could you please open an issue? > > Cheers, > Doru > > > On Apr 3, 2013, at 7:36 PM, Nicolas Anquetil <[hidden email]> wrote: > > > > > then another question: > > > > is there a logic behind the decision to use privateState or instance variables? > > > > is it to save memory (as I understood from the mooseBook: "MinimalState") > > > > But if so, is it really needed for something like a boolean (hasClassScope)? > > > > nicolas > > > > On 04/03/2013 05:55 PM, Tudor Girba wrote: > >> No, it is not. > >> > >> privateState is not a meta-model property. It is only an implementation issue to offer state extensions in Pharo. > >> > >> Cheers, > >> Doru > >> > >> > >> On Apr 3, 2013, at 5:43 PM, Anne Etien <[hidden email]> wrote: > >> > >>> Hi, > >>> > >>> Shouldn't the hasClassScope property of FAMIXMethod be declared as <derived>? It is computed from privateState just as isConstructor or declaredExceptions which are derived. > >>> > >>> Same question for timeStamp. > >>> > >>> Thanks in advance. > >>> > >>> Anne > >>> _______________________________________________ > >>> Moose-dev mailing list > >>> [hidden email] > >>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev > >> -- > >> www.tudorgirba.com > >> > >> "Presenting is storytelling." > >> > >> > >> _______________________________________________ > >> Moose-dev mailing list > >> [hidden email] > >> https://www.iam.unibe.ch/mailman/listinfo/moose-dev > > > > -- > > Nicolas Anquetil -- RMod research team (Inria) > > > > _______________________________________________ > > Moose-dev mailing list > > [hidden email] > > https://www.iam.unibe.ch/mailman/listinfo/moose-dev > > -- > www.tudorgirba.com > > "Things happen when they happen, > not when you talk about them happening." > > > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev > > > > -- > Andre Hora > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev -- www.tudorgirba.com "Yesterday is a fact. Tomorrow is a possibility. Today is a challenge." _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Free forum by Nabble | Edit this page |