[Better Comment Initiative]: FAMIXSourceLanguage

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[Better Comment Initiative]: FAMIXSourceLanguage

Stéphane Ducasse
We get
------
FAMIXSourceLanguage

This represents the programming language in which an entity is written. It is used for dispatching entity actions for specific languages. For example, formatting a source text will be performed according to the language.

We can get
---------

I represent the programming language in which an entity is written. I'm used for dispatching entity actions for specific languages. For example, formatting a source text will be performed according to the language.

API:
        format: aSourceString from: anEntity
       
        isAttached
                @@no idea what it is.@@

        sourcedEntities
                References to the entities saying explicitly that are written in this language

                @@But it does not help me at all@@


Now I do not get why we have sourceEntities added to the source language.



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Better Comment Initiative]: FAMIXSourceLanguage

Nicolas Anquetil

You can specify only one SourceLanguage in a model and it becomes the language by default for all the entities in the model.

Then you can also have a specific SourceLanguage that is for some entities. They point to it and it points to them.

That allows to have entities from several langagues in the same model:

"I represent the programming language in which an entity is written.
I'm used for dispatching entity actions for specific languages. For example, formatting a source text will be performed according to the language.
Different entities in a model can point to their own SourceLanguage, or they can have none and in this case, they are assumed to belong to the default SourceLanguage in the model.
They should be at least one SourceLanguage instance in a model (the default language)"

nicolas

----- Mail original -----

> De: "Stéphane Ducasse" <[hidden email]>
> À: "Moose-related development" <[hidden email]>
> Envoyé: Mardi 27 Septembre 2011 09:57:34
> Objet: [Moose-dev] [Better Comment Initiative]: FAMIXSourceLanguage
> We get
> ------
> FAMIXSourceLanguage
>
> This represents the programming language in which an entity is
> written. It is used for dispatching entity actions for specific
> languages. For example, formatting a source text will be performed
> according to the language.
>
> We can get
> ---------
>
> I represent the programming language in which an entity is written.
> I'm used for dispatching entity actions for specific languages. For
> example, formatting a source text will be performed according to the
> language.
>
> API:
> format: aSourceString from: anEntity
>
> isAttached
> @@no idea what it is.@@
>
> sourcedEntities
> References to the entities saying explicitly that are written in this
> language
>
> @@But it does not help me at all@@
>
>
> Now I do not get why we have sourceEntities added to the source
> language.
>
>
>
> _______________________________________________
> 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
Reply | Threaded
Open this post in threaded view
|

Re: [Better Comment Initiative]: FAMIXSourceLanguage

Tudor Girba-2
In reply to this post by Stéphane Ducasse
Hi,

First note: in Moose we use third person for comments, not first person.

Second note: we decided to put the comment related to the meta-model in the <FM3Comment:> on the class side, and we keep the implementation Smalltalk comments for the class.

The rest is inline.


On Tue, Sep 27, 2011 at 9:57 AM, Stéphane Ducasse <[hidden email]> wrote:
We get
------
FAMIXSourceLanguage

This represents the programming language in which an entity is written. It is used for dispatching entity actions for specific languages. For example, formatting a source text will be performed according to the language.

We can get
---------

I represent the programming language in which an entity is written. I'm used for dispatching entity actions for specific languages. For example, formatting a source text will be performed according to the language.

API:
       format: aSourceString from: anEntity

          This is not really an API. As the category says, it is a utility method used internally by Moose.
 
       isAttached
               @@no idea what it is.@@

          This says whether there are any entities attached associated with language. Again, this is a utility method. By default, if there are no entities attached, it means that all of them are of this language.

 
       sourcedEntities
               References to the entities saying explicitly that are written in this language

               @@But it does not help me at all@@

           This is what it is :). See the comment above.

Doru
 

Now I do not get why we have sourceEntities added to the source language.



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



--
--

"Every thing has its own flow"


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Better Comment Initiative]: FAMIXSourceLanguage

Tudor Girba-2
In reply to this post by Nicolas Anquetil
Thanks Nicolas.

This is a good comment.

Doru


On Tue, Sep 27, 2011 at 1:48 PM, Nicolas Anquetil <[hidden email]> wrote:

You can specify only one SourceLanguage in a model and it becomes the language by default for all the entities in the model.

Then you can also have a specific SourceLanguage that is for some entities. They point to it and it points to them.

That allows to have entities from several langagues in the same model:

"I represent the programming language in which an entity is written.
I'm used for dispatching entity actions for specific languages. For example, formatting a source text will be performed according to the language.
Different entities in a model can point to their own SourceLanguage, or they can have none and in this case, they are assumed to belong to the default SourceLanguage in the model.
They should be at least one SourceLanguage instance in a model (the default language)"

nicolas

----- Mail original -----
> De: "Stéphane Ducasse" <[hidden email]>
> À: "Moose-related development" <[hidden email]>
> Envoyé: Mardi 27 Septembre 2011 09:57:34
> Objet: [Moose-dev] [Better Comment Initiative]: FAMIXSourceLanguage
> We get
> ------
> FAMIXSourceLanguage
>
> This represents the programming language in which an entity is
> written. It is used for dispatching entity actions for specific
> languages. For example, formatting a source text will be performed
> according to the language.
>
> We can get
> ---------
>
> I represent the programming language in which an entity is written.
> I'm used for dispatching entity actions for specific languages. For
> example, formatting a source text will be performed according to the
> language.
>
> API:
> format: aSourceString from: anEntity
>
> isAttached
> @@no idea what it is.@@
>
> sourcedEntities
> References to the entities saying explicitly that are written in this
> language
>
> @@But it does not help me at all@@
>
>
> Now I do not get why we have sourceEntities added to the source
> language.
>
>
>
> _______________________________________________
> 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



--
--

"Every thing has its own flow"


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Better Comment Initiative]: FAMIXSourceLanguage

Stéphane Ducasse
In reply to this post by Stéphane Ducasse
This represents the programming language in which an entity is written. It is used for dispatching entity actions for specific languages. For example, formatting a source text will be performed according to the language.

For projects that have multiple languages and when you want to be able to query them,
you will have multiple sourcelanguages and to be able to query the entities for each, you can attach entities to a sourceLanguage using addSourceEntity:

I added comment to isAttached (bad name anyway).

I will publish the code when I can.

Stef
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Better Comment Initiative]: FAMIXSourceLanguage

Tudor Girba-2
Excellent!

Doru



On Sep 27, 2011, at 14:59, Stéphane Ducasse <[hidden email]> wrote:

> This represents the programming language in which an entity is written. It is used for dispatching entity actions for specific languages. For example, formatting a source text will be performed according to the language.
>
> For projects that have multiple languages and when you want to be able to query them,
> you will have multiple sourcelanguages and to be able to query the entities for each, you can attach entities to a sourceLanguage using addSourceEntity:
>
> I added comment to isAttached (bad name anyway).
>
> I will publish the code when I can.
>
> Stef
> _______________________________________________
> 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
Reply | Threaded
Open this post in threaded view
|

Re: [Better Comment Initiative]: FAMIXSourceLanguage

Stéphane Ducasse
In reply to this post by Tudor Girba-2

On Sep 27, 2011, at 2:44 PM, Tudor Girba wrote:

> Hi,
>
> First note: in Moose we use third person for comments, not first person.

Ok I will change again... :(


> Second note: we decided to put the comment related to the meta-model in the <FM3Comment:> on the class side, and we keep the implementation Smalltalk comments for the class.

I will duplicate the them because when I read code I do not read the class side.

>
> The rest is inline.
>
>
> On Tue, Sep 27, 2011 at 9:57 AM, Stéphane Ducasse <[hidden email]> wrote:
> We get
> ------
> FAMIXSourceLanguage
>
> This represents the programming language in which an entity is written. It is used for dispatching entity actions for specific languages. For example, formatting a source text will be performed according to the language.
>
> We can get
> ---------
>
> I represent the programming language in which an entity is written. I'm used for dispatching entity actions for specific languages. For example, formatting a source text will be performed according to the language.
>
> API:
>        format: aSourceString from: anEntity
>
>           This is not really an API. As the category says, it is a utility method used internally by Moose.
>  
>        isAttached
>                @@no idea what it is.@@
>
>           This says whether there are any entities attached associated with language. Again, this is a utility method. By default, if there are no entities attached, it means that all of them are of this language.
>
>  
>        sourcedEntities
>                References to the entities saying explicitly that are written in this language
>
>                @@But it does not help me at all@@
>
>            This is what it is :). See the comment above.
>
> Doru
>  
>
> Now I do not get why we have sourceEntities added to the source language.
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
>
> --
> --
> www.tudorgirba.com
>
> "Every thing has its own flow"
>
> _______________________________________________
> 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