Please consider editing your post and mark it as obsolete instead. Do you want to delete post?
Concepts and concept interfaces
WzDrg
Created
What is the use of having concepts and concept interfaces. Couldn't you express everything using just concepts allowing concepts inheriting from multiple concepts?
We've created concepts and concept interfaces since we like the way classes and interfaces are implemented in java. It's possible to express everything with concepts that support multiple inheritance but concept interfaces designate concept that can be traits of another concept.
For each concept you need to decide which type to use a Concept or a Concept Interface. (Currently it is impossible to convert a concept into a concept interface or vice versa).
I have always found the difference between interfaces (in fact completely abstract classes) and classes in java artificial. I have been developing java programs the last 10 years and I know that everything can be expressed using classes and interfaces (or concepts and concept interfaces), but often a whole lot of useless code is needed to support certain features (look at the amount of interfaces needed to effectively use Spring in an application). A language like scala where multiple inheritance is supported using traits or eiffel where no interfaces exist provide much more flexibility to design and create a solution.
Shouldn't concept interfaces be treated as a special type of concept and multiple inheritance be allowed?
You really busy working on a great product with fantastic possibilities. The past years I always thought that I lost too much time translating business into something the computer understands. Although java IDE's have improved a lot, I've always felt the urge to find a language, a method to increase productivity. MPS is definitely a superior solution waiting to become a great product.
Returning to interfaces... at second sight though, interface-concept has certain limitations : it won't appear in 'New root node' menu and won't show-up in a default auto-completion menu.
Therefore leaf concepts in your hierarchy most likely must be solid concrete concepts.
Hello, Marc,
We've created concepts and concept interfaces since we like the way classes and interfaces are implemented in java. It's possible to express everything with concepts that support multiple inheritance but concept interfaces designate concept that can be traits of another concept.
For each concept you need to decide which type to use a Concept or a Concept Interface. (Currently it is impossible to convert a concept into a concept interface or vice versa).
I have always found the difference between interfaces (in fact completely abstract classes) and classes in java artificial. I have been developing java programs the last 10 years and I know that everything can be expressed using classes and interfaces (or concepts and concept interfaces), but often a whole lot of useless code is needed to support certain features (look at the amount of interfaces needed to effectively use Spring in an application). A language like scala where multiple inheritance is supported using traits or eiffel where no interfaces exist provide much more flexibility to design and create a solution.
Shouldn't concept interfaces be treated as a special type of concept and multiple inheritance be allowed?
They are treated as special kinds of concepts. It's possible to have an instance of a concept interface inside of a model.
Is it possible to create a complete model using only concept interfaces instead of using concepts and concept interfaces?
Hi Marc,
Yes, you can do that.
The only reason why we did choose interface-concept over multiple inheritance is that we support generation of java api from a language structure.
When developing a language you are free to choose either oop approach, providing that you are not going to use the generated api.
Thanks for the quick and clear response.
You really busy working on a great product with fantastic possibilities. The past years I always thought that I lost too much time translating business into something the computer understands. Although java IDE's have improved a lot, I've always felt the urge to find a language, a method to increase productivity. MPS is definitely a superior solution waiting to become a great product.
Keep up the good work.
Great to hear you believe in MPS! :-)
Returning to interfaces... at second sight though, interface-concept has certain limitations : it won't appear in 'New root node' menu and won't show-up in a default auto-completion menu.
Therefore leaf concepts in your hierarchy most likely must be solid concrete concepts.