lilypond-devel
[Top][All Lists]
Advanced

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

Re: Clean up embedded scheme parsing/evaluation. (issue 577410045 by add


From: Dan Eble
Subject: Re: Clean up embedded scheme parsing/evaluation. (issue 577410045 by address@hidden)
Date: Thu, 30 Jan 2020 09:31:03 -0500

On Jan 30, 2020, at 04:54, address@hidden wrote:
> 
> This may predate you, but the decision to not store references was
> intentional,
> exactly because storing NULL in them is very useful.  If you have a
> reference,
> it has to be initialized in the constructor, and this introduces a lot
> of boilerplate
> because you have to pass the non-null reference across constructors in
> the class
> hierarchy. 

The discussion has turned from (a) passing a required parameter as a reference, 
to (b) using a reference as a member variable.  (a) does not imply (b).  You 
can pass in a T& and store it in a T* to avoid the constraints that (b) would 
place on the use of your class (though they apparently were not previously a 
problem in this case).

> The current code overwhelmingly disavows references. The 2 remaining
> uses (this being one) stand out like a sore thumb.

We must be miscommunicating, because I see a lot more than 2.  For some 
examples,

    git grep 'vector<[^>]\+> &'

Please clarify.

Thanks,
— 
Dan




reply via email to

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