Re: Consensus on getter conventions?
- From: Derek Simkowiak <dereks kd-dev com>
- To: Maciej Stachowiak <mjs eazel com>
- Cc: Karl Nelson <kenelson ece ucdavis edu>,kenelson rainbow ece ucdavis edu, gnome-hackers gnome org,gtk-devel-list gnome org
- Subject: Re: Consensus on getter conventions?
- Date: Thu, 24 Aug 2000 17:21:55 -0700 (PDT)
-> > -> My personal preference is to have all get_* functions which return
-> > -> something be a pointer to a "static" piece of memory.
[...]
-> Karl's idea makes getters that return references pretty
-> inconvenient to use from C; you must use a temporary variable even if
-> you're going to pass the result to a function that will assume
-> ownership.
First, I don't really see this as a huge problem. Putting results
into variables (instead of using nested function calls) makes for more
readable code. But you do have a point...
Second, apparantly Karl's method causes problems for other
languages (at least, it does for Java).
--Derek
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]