2013/3/25 Lionel Auroux <
lionel...@gmail.com>:
> After reading your complain, I think we just miss the point in the
> abstraction of type in rathaxes.
>
> Rathaxes type must provide abstraction of target language type (here C).
> But our poor type handling in Cnorm and then in rathaxes make kernel type
> mapping difficult and inefficient.
>
> Describe this abstraction in subsystem interface (RTI) with 'type' statement
> attribute/method seems to be good.
>
> As I see, your big problem is in the mapping of this interface type into a
> concrete type in C.
>
> Before encapsulate things into a mangled type container with the decl
> statement, it could be judicious to just revise our requirement.
>
> I think sometimes you just need to alias the rathaxes type directly to a C
> type, sometimes you don't.
>
> Your example is for me the typical use case of an aliasing feature.
>
> Let me redefine our keywords.
>
> * in RTI:
> - type statement allow to describe a type statement
> -- attribute allow to access scalar element of this aggregate
> -- method as in OOP
>
> ?? Could a type contains many decl statement? I don't think so. or I forgot.
> so, why we need to say it in the RTI?
No, only one decl statement can is valid within both RTI and BLT files.
The reason why we must explicit it is as always a decision issue:
Since we want our language to be flexible, and defined by the interfaces,
this is the only way to enforce WHERE the decl will be weaved in the
generated code.
>
> * in BLT:
> - the concrete part of the type should be only of two kinds : decl or alias
> - decl as usual to compose a new type from different part of target
> language/systems
> - alias as you show us. because our rathaxes abstraction is directly feed by
> the target system thru a C type.
>
> Of course, for all kinds of type we have ref/scalar artefacts.
>
> Does these new requirements fit your coding experience?
This seems similar to what Louis proposed, with the difference that it
may integrate better inside the current rathaxes language :)
>
> --
> Cordialement,
> Lionel Auroux
>
> --
> --
> ML Rathaxes
>
www.rathaxes.org
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Rathaxes Development List" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
rathaxes-deve...@googlegroups.com.
> For more options, visit
https://groups.google.com/groups/opt_out.
>
>
--
David Pineau,
Developer R&D at Scality