Re: Consensus on getter conventions?



-> > -> 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]