lilypond-user
[Top][All Lists]
Advanced

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

Re: Identify included files


From: David Kastrup
Subject: Re: Identify included files
Date: Thu, 21 May 2020 15:36:10 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

antlists <address@hidden> 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

[Prev in Thread] Current Thread [Next in Thread]