antlists <antli...@youngman.org.uk> writes:

> On 21/05/2020 01:49, David Wright wrote:
>> I don't understand your equivalence between .ily and .h files. The
>> .ily file(s) can contain just as much code as the .ly file(s), whereas
>> .h files don't contain any code at all (in the sense of producing
>> executable code for the next stage.
>
> a) just like .h files, .ily files can't be passed directly to a
> compiler for compilation.
>
> b) who says .h files don't produce executable code? They often contain
> code, sometimes entire functions.

The point of .h files is that they are intended to be included by more
than one compilation unit resulting in an executable.

As such, they are limited with regard to the code they can contain.
They can contain

a) inline function definitions: those can occur in multiple compilation
units as long as they are identical.
b) static inline: do not even need to be identical, are per-unit.
c) static data definitions, are per-unit.
d) template function definitions

I don't think that .ly/.ily is all that comparable here...

-- 
David Kastrup

Reply via email to