Re: [RFC] export TRUE and FALSE from someplace



>> If the booleans do have a more specific meaning, other names should be
>> chosen (as Joe Smith demonstrated) with more semantic meaning:
>>
>>  $box->pack_start ($widget, NO_EXPAND, NO_FILL, 0);
>>  $window->signal_connect (delete_event => sub { return
>>  TOP_EVENT_PROPAGATION });
>... this is certainly very true.

*except that* there is no semantic meaning to the new definitions if they were just equal to TRUE/FALSE so
$box->pack_start ($widget, NO_FILL, EXPAND, 0);
would also be legal making things worse.

It might be nice to be able to do
$box->pack_start ($widget, expand=>FALSE, fill=>FALSE, pad=>0);
(or with yes/no, etc.) at least as an option. That might help prevent a few errors that people like me make when we forget the order of the args after seeing:
$box->pack_start ($widget, 0, 0, 0);
:=)

--john
--
John McDermott
Writer, Educator, Consultant
jjm jkintl com          http://www.jkintl.com
V +1 505/377-6293 F +1 505/377-6313




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