|
From: | John W. Eaton |
Subject: | Re: strategy for .h files? |
Date: | Tue, 2 May 2017 18:06:38 -0400 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.6.0 |
On 05/02/2017 04:18 PM, Rik wrote:
Summarizing, Octave's aim is for lightweight header files.
Generally, yes. But I would also add that inline function definitions are fine, provided that they are relatively small and don't require pulling in system- or feature-dependent header files.
Without inlining things like forwarding through the rep pointer (all the "rep->foo ()" calls in octave_value, for example) I think the performance would really suffer. In the future we might be able to avoid using reference counting for some of these core classes (like octave_value) or rely more heavily on link-time optimization, but until then, we need function inlining and for that to work we have to provide many function definitions in the header files.
jwe
[Prev in Thread] | Current Thread | [Next in Thread] |