On Jul 27, 2022, at 02:02, Jean Abou Samra wrote:
>
> Did you mean for rather than if, or is this syntax I am not aware of?
Yes, sorry.
—
Dan
nd readers will be expecting it).
>
>// set! all elements of the_list to #f
>if (SCM &s : as_ly_scm_list (the_list))
> s = SCM_BOOL_F;
Did you mean for rather than if, or is this syntax I am not aware of?
Thanks,
Jean
list (lvalue).
> Is there a way to use ly_scm_list nevertheless and not as_ly_scm_list in
> order not to put the reader in a mode where they look for in-place
> modifications of the SCM lvalue?
Readers will know that you are just iterating if you use a range-based for loop.
If the vari
> Le 25 juil. 2022 à 16:55, Dan Eble a écrit :
>
> On Jul 24, 2022, at 19:04, Jean Abou Samra wrote:
>>
>> I understand that ly_scm_list takes an rvalue and disallows
>> lvalues for clarity, while as_ly_scm_list takes an lvalue,
>> and will fail on an r
On Jul 24, 2022, at 19:04, Jean Abou Samra wrote:
>
> I understand that ly_scm_list takes an rvalue and disallows
> lvalues for clarity, while as_ly_scm_list takes an lvalue,
> and will fail on an rvalue by design, with the failure being
> a compilatio
lily-lexer.cc contains
for (SCM scope : as_ly_scm_list (scopes_))
ly_use_module (module, scope);
When I read this code again after modifying it some
time ago, my reaction was "what, scopes_ will be SCM_EOL
at the end of this iteration, didn't I introduce a big
bad bug??"