On Sun, 2013-12-08 at 23:34 +0100, Wolfgang Schlichtner wrote:
> Hi,
> 
> i noticed that some methods/properties are implemented for some integral
> types but aren't for others, see the following table:
> 
>                   u                               u       u       u
>               s   s               u       u   i   i   i   i   i   i
>               h   h       u   l   l   i   i   n   n   n   n   n   n
>               o   o   i   i   o   o   n   n   t   t   t   t   t   t
>               r   r   n   n   n   n   t   t   1   1   3   3   6   6
>               t   t   t   t   g   g   8   8   6   6   2   2   4   4
> object ─────────┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼──
>   to_string   +   +   +   +   +   +   +   +   +   +   +   +   +   +
>   clamp       +   +   +   +   +   +   +   +   +   +   +   +   +   +
>   abs             o   +   o   +   o       o       o       o   +   o
>   to_big_endian       +   +   +   +   o   o   +   +   +   +   +   +
>   to_little_endian    +   +   +   +   o   o   +   +   +   +   +   +
>   swap_big_endian_pdp                 o   o       +       +        
>   swap_little_endian_pdp              o   o       +       +        
>   swap_little_endian_big_endian       o   o       +       +   +    
>   to_pointer          +   +                                        
> class ──────────┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼──
>   MIN         +   +   +   +   +   +   +   +   +   +   +   +   +   +
>   MAX         +   +   +   +   +   +   +   +   +   +   +   +   +   +
>   min         +   +   +   +   +   +   +   +   +   +   +   +   +   +
>   max         +   +   +   +   +   +   +   +   +   +   +   +   +   +
>   FORMAT                                      +   +   +   +   +   +
>   FORMAT_MODIFIER                             +   +   +   +   +   +
>   parse               +       +                               +   +
>   try_parse                                                   +   +
>   from_big_endian     +   +   +   +   o   o   +   +   +   +   +   +
>   from_little_endian  +   +   +   +   o   o   +   +   +   +   +   +
>   to_network                          o   o       +       +        
>   from_network                        o   o       +       +        
> 
> this seems especially wrong to me for:
>  abs(), parse() and try_parse()
> 
> am i missing something? is this by intention?

I wouldn't say it's intentional so much as a result of missing
functionality at the C level, though in some cases it may just be
missing bindings.  If you want to try to fill in the missing I'm
definitely willing to accept patches, though it will likely involve
wrapper methods which call the relevant functions on wider types then
casts the result.

BTW, class methods in Vala (and GObject) are something different.
Better terminology would be "instance" and "static".


-Evan

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
vala-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to