Forum: Ruby-Gnome 2 Simplification for ruby-gnome2 in general: the use of symbols rather than Gtk:: Enum Structures?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
7e17d370dc95b48cd82944a62f1caf76?d=identicon&s=25 Robert H. (Guest)
on 2015-07-03 20:40

I was looking at old ruby-gnome code that I have here
and see stuff like this:

    notebook =

However, it occurred to me that knowing Gtk::POS_LEFT
seems superfluous.

We are using Ruby, not a lower level language here, so
I was thinking, this could be this:


And internally get mapped to Gtk::POS_LEFT right?

Now I don't know if this would be good or bad, so I
am just making it as a suggestion - perhaps noone
was thinking about it so far.

I understand that the C API is the main target,
but I wonder if we could use additional constructs
to make the code more ruby-like (just as we
have methods such as set_foo() and also foo= )
This topic is locked and can not be replied to.