guix-devel
[Top][All Lists]
Advanced

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

Re: question regarding substitute* and #t


From: Mark H Weaver
Subject: Re: question regarding substitute* and #t
Date: Thu, 25 Jan 2018 15:02:57 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Arun Isaac <address@hidden> writes:

> Mark H Weaver <address@hidden> writes:
>
>> After we switch to using 'invoke' everywhere, or more precisely, after
>> we arrange to never return #false from any phase or snippet, then
>> there should be one more step before removing the vestigial #true
>> returns: we should change the code that calls phases or snippets to
>> ignore the value(s) returned by those procedures.  When that is done,
>> then the #t's will truly be vestigial.  Does that make sense?
>
> I think we should start removing the vestigial #true right away. Why
> wait until we can make the code that calls phases ignore the values
> returned by those phases? As it stands, that code errors out only when a
> phase returns #false, not when it returns any other value (even
> unspecified). WDYT?
>
> The #true is already vestigial.

They are not vestigial if we care about code correctness.

Phases and snippets are currently specified to return a boolean, and
furthermore we must return the _appropriate_ boolean to indicate success
for failure.  I consider it unacceptable to not bother returning
anything, allowing a completely unspecified value to be returned, and
think that this is okay because it happens to work, for now, because of
an internal implementation detail of Guile.

This (unfortunately widespread) practice of sloppiness in software
engineering is how we ended up in the mess we are in today, where our
software is drowning in bugs and our systems are hopelessly insecure.

Let the annoyance that you and others feel about these unsightly #t's
supply the motivation to fix this issue properly.

      Mark



reply via email to

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