Re: batching gets and searching



>Delivered-To: gconf-list gnome org
>X-Authentication-Warning: icon.labs.redhat.com: hp set sender to hp redhat com using -f
>To: Colm Smyth <Colm Smyth ireland sun com>
>Cc: gconf-list gnome org
>Subject: Re: batching gets and searching
>From: Havoc Pennington <hp redhat com>
>User-Agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.7
>MIME-Version: 1.0
>X-BeenThere: gconf-list gnome org
>X-Loop: gconf-list gnome org
>X-Mailman-Version: 2.0beta5
>List-Id: Discussion of the GConf library <gconf-list.gnome.org>
>
>
>Colm Smyth <Colm Smyth ireland sun com> writes:
>> You could document a parameter using comments like:
>> 
>> void my_func( int /* MyFlagsEnumType */ flags )
>> 
>> which at least makes a correct use of the language type mechanism.
>>
>
>Well, flags are in essence a violation of the type mechanism to begin
>with (Stroustrup says something to that effect in the third edition).
>In C enums simply are not distinct types from int, so there's no
>additional violation; in C++ the result of a bunch of enum values |'d
>together is not typesafe in the same sense void* isn't.
>
>Anyway, convention wins here. I don't think it's a sufficiently
>important point to create inconsistency.

I agree about conventions, but requiring a cast is bad.

>> By the way, it's a bad idea to export interfaces using C++ because
>> name-mangling tends to change between compiler versions and
>> is never consistent between different compilers. If the wrapper
>> is small enough, it could be provided as source to be compiled
>> into each client application.
>> 
>
>Remember this stuff is open source. ;-) People can compile it with
>whatever compiler they want.

Just my point, so you cannot create a reliable ABI by compiling
C++ into a .so.

>Havoc
>
>
>
>_______________________________________________
>Gconf-list mailing list
>Gconf-list gnome org
>http://mail.gnome.org/mailman/listinfo/gconf-list

--
Colm Smyth - Sun Microsystems, Ireland - Desktop S/W Engineering
Sun Xtn: 19166    Phone: 353-1-819-9166   Fax: 353-1-819-9200





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