[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: question regarding substitute* and #t
From: |
Andy Wingo |
Subject: |
Re: question regarding substitute* and #t |
Date: |
Wed, 24 Jan 2018 16:27:06 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) |
On Wed 24 Jan 2018 15:45, Hartmut Goebel <address@hidden> writes:
> Am 24.01.2018 um 13:14 schrieb Andy Wingo:
>> On Wed 24 Jan 2018 13:06, Mark H Weaver <address@hidden> writes:
>>
>>> + ;; Install to the right directory
>>> + (substitute* '("Makefile"
>>> + "Qsci/Makefile")
>>> + (("\\$\\(INSTALL_ROOT\\)/gnu/store/[^/]+")
>>> + (assoc-ref outputs "out")))
>>> + #t)))))
>> I guess once we switch over all instances of "system" and "system*" to
>> use invoke, does that mean we will also be able to remove these
>> vestigial "#t" returns?
> I wonder why substitute* not simply returns #t?!
There was a proposal to make it return #t! However then someone pointed
out that actually instead of making phases return boolean results, we
should instead signal problems via exceptions, and that drove the shift
from system / system* to invoke. In the future world where completion
means success, it doesn't matter what substitute* returns.
However! Because it doesn't matter, perhaps in the interest of
transition we should make substitute* return #t, so that once we switch
to the new exception-based error signalling, that we have less code to
clean up later.
Andy
- question regarding substitute* and #t (was: Simplifications enabled by switching to 'invoke'), (continued)
- question regarding substitute* and #t (was: Simplifications enabled by switching to 'invoke'), Andy Wingo, 2018/01/24
- Re: question regarding substitute* and #t, Mark H Weaver, 2018/01/24
- Re: question regarding substitute* and #t, Andy Wingo, 2018/01/24
- Re: question regarding substitute* and #t, Kei Kebreau, 2018/01/24
- Re: question regarding substitute* and #t, Maxim Cournoyer, 2018/01/25
- Re: question regarding substitute* and #t, Andy Wingo, 2018/01/25
- Re: question regarding substitute* and #t, Maxim Cournoyer, 2018/01/25
- Re: question regarding substitute* and #t, Arun Isaac, 2018/01/25
- Re: question regarding substitute* and #t, Mark H Weaver, 2018/01/25
Re: question regarding substitute* and #t, Hartmut Goebel, 2018/01/24