(0003291)
|
maxime
|
2018-05-02 11:31
|
|
At the moment, the notion of generic functions is still provided as a proof-of-concept prototype. We are addressing it in the current set of updates for TASTE and we will update it step by step based on the needs.
It is so far restricted to individual functions in SDL. One function can be defined as a type, and other as instances of this type. No further refinements on the instance can be made, i.e. we have no inheritance mechanism yet.
The next version of the GUI will ease the creation of types and the instantiation process, as well as the storage in an external library of components (available on the left side, like the PeekPoke component).
Here are a few of the ideas in the roadmad, in order of complexity:
1) Extend to pure Ada and to C++
2) Use context parameters to specify context-dependent constants (set as placeholder in the type with a default value, and actual value in the instances)
3) Use context parameters as they are defined in the SDL standard (i.e. a full template engine / close to Ada generics)
4) Support inheritance / allow overriding the code of PI (ie. OO model from SDL)
and
5) what you introduce: SDL Block/System Type - (Nesting function that is a type and that can be instantiated).
This will be a bit more complicated, but we'll eventually get there. |
|