|
|
Re: [XCORE] How To Design Question: How to model extensible single instances [message #1398768 is a reply to message #1398745] |
Fri, 11 July 2014 10:59   |
Eclipse User |
|
|
|
Ed,
yes, i want to model Singletons.
I've already modeled Singleton's in 'asm', in 'C', in 'Java', etc.
---
Singletons, especially extensible Singletons, are all around in real
World.
---
There is a "Car-Type", is a "VW", is a "VW-Golf", is a "VW-Golf-V", is a ...
All these are Singleton Enum's, but with derived properties and derived op's.
---
There is one Singleton "VW-Golf-V"-model, but many bought instances ...
I don't have any idea how to model this ...
|
|
|
Re: [XCORE] How To Design Question: How to model extensible single instances [message #1398786 is a reply to message #1398768] |
Fri, 11 July 2014 11:36  |
Eclipse User |
|
|
|
Comments below.
On 11/07/2014 4:59 PM, xjn Mising name wrote:
> Ed,
>
> yes, i want to model Singletons.
>
> I've already modeled Singleton's in 'asm', in 'C', in 'Java', etc.
You've implemented it.
>
> ---
>
> Singletons, especially extensible Singletons, are all around in real
> World.
Yes and you can implement them in pretty much any language.
> ---
>
> There is a "Car-Type", is a "VW", is a "VW-Golf", is a "VW-Golf-V", is
> a ...
>
> All these are Singleton Enum's, but with derived properties and
> derived op's.
>
> ---
>
> There is one Singleton "VW-Golf-V"-model, but many bought instances ...
>
> I don't have any idea how to model this ...
As I said, this is not an appropriate domain in which to model. Some
things are best done in Java. Xcore doesn't aim to replace Java, it
aims to be better (less verbose and more flexible) at certain types of
things than Java and to integrate well with Java. In the end Xcore
maps onto Ecore and there is no such concept as a singleton so you can't
model it (with Ecore).
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.09231 seconds