From: zimoun <zimon.toutoune@gmail.com>
To: "Maxim Cournoyer" <maxim.cournoyer@gmail.com>,
"Ludovic Courtès" <ludo@gnu.org>,
"Guix Devel" <guix-devel@gnu.org>
Cc: Tobias Geerinckx-Rice <me@tobias.gr>,
Josselin Poiret <dev@jpoiret.xyz>,
Mathieu Othacehe <othacehe@gnu.org>,
Christopher Baines <mail@cbaines.net>,
Ricardo Wurmus <rekado@elephly.net>
Subject: Exception: srfi-35 vs (ice-9 exceptions (was Re: [bug#60802] [PATCH v2 1/2] platforms: Raise an exception when no suitable platform is found.)
Date: Mon, 16 Jan 2023 21:13:14 +0100 [thread overview]
Message-ID: <864jsq8ch1.fsf@gmail.com> (raw)
In-Reply-To: <87mt6i5q4q.fsf@gmail.com>
Hi Maxim,
On Mon, 16 Jan 2023 at 12:46, Maxim Cournoyer <maxim.cournoyer@gmail.com> wrote:
>> So far the we use (srfi srfi-35) exclusively to define condition types;
>> I think we should do the same here, for consistency.
>
> Could we instead start migrating away from srfi-35 to (ice-9
> exceptions), which is the new native way to use exceptions in Guile?
Well, I think this should be discussed separately. Therefore,
-60802@debbugs.gnu.org and +guix-devel. :-)
> I
> think it'd be nicer to use it in the future, to avoid newcomers being
> confusing about the 3 or 4 ways to manage exceptions in Guile
> (recommended read on the topic:
> https://vijaymarupudi.com/blog/2022-02-13-error-handling-in-guile.html).
In Guile maybe several but only one in Guix: (srfi srfi-35). :-)
> Migrating the whole code at once doesn't seem a good idea, so gradually
> transitioning (such as using (ice-9 exceptions) for new code) appears a
> good idea to me, if we agree on the direction!
Just to note that all Guix is using (srfi srfi-35); except,
--8<---------------cut here---------------start------------->8---
1 candidates:
./guix/build/minetest-build-system.scm:26: #:use-module (ice-9 exceptions)
--8<---------------cut here---------------end--------------->8---
Therefore, this plan needs to be a bit cooked, otherwise it will become
quickly a big mess with 2 ways for managing exceptions – and people, at
least me, will be confused to pick the correct one depending on the
module.
Well, if such migration makes sense (I do not know?), from my point of
view, the migration of the whole code in a short period of time appears
to me the best; probably with a dedicated WIP branch.
Cheers,
simon
next parent reply other threads:[~2023-01-16 20:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20230114041903.7121-2-maxim.cournoyer@gmail.com>
[not found] ` <87o7r19ocn.fsf@gnu.org>
[not found] ` <87mt6i5q4q.fsf@gmail.com>
2023-01-16 20:13 ` zimoun [this message]
2023-01-16 21:59 ` Exception: srfi-35 vs (ice-9 exceptions (was Re: [bug#60802] [PATCH v2 1/2] platforms: Raise an exception when no suitable platform is found.) Maxim Cournoyer
2023-01-17 16:35 ` Ludovic Courtès
2023-01-16 22:35 ` Ricardo Wurmus
2023-01-17 19:58 ` Josselin Poiret
2023-01-19 14:38 ` Ludovic Courtès
2023-01-19 15:59 ` Katherine Cox-Buday
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=864jsq8ch1.fsf@gmail.com \
--to=zimon.toutoune@gmail.com \
--cc=dev@jpoiret.xyz \
--cc=guix-devel@gnu.org \
--cc=ludo@gnu.org \
--cc=mail@cbaines.net \
--cc=maxim.cournoyer@gmail.com \
--cc=me@tobias.gr \
--cc=othacehe@gnu.org \
--cc=rekado@elephly.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).