Re: [Vala] methods/properties missing for some integral data types



The table takes 67 columns in width, this shouldn't be a problem.

I know that the "problem" originates from GLib, but I think that there
should be guaranteed interface for the basic types of a language. For
the integral types just:
to_string(), clamp(), min(), max(), MIN, MAX
are there for all of them. Why not implement them (at least some) in
Vala regardless of GLib (or in GLib directly of course) ?

On Mon, 2013-12-09 at 13:11 -0500, Steven Oliver wrote:
Your table does not line up for me at all by the way.

In regards to your question I believe what your seeing is actually because
of GLib. If GLib doesn't do it, neither does Vala.

Steven N. Oliver


On Sun, Dec 8, 2013 at 5:34 PM, 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?

Regards

Wolfgang

_______________________________________________
vala-list mailing list
vala-list gnome org
https://mail.gnome.org/mailman/listinfo/vala-list







[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]