chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] [PATCH] Fix record type tags to be nonglobal by mo


From: Peter Bex
Subject: Re: [Chicken-hackers] [PATCH] Fix record type tags to be nonglobal by module-prefixing them
Date: Tue, 18 Jul 2017 08:30:10 +0200
User-agent: NeoMutt/20170113 (1.7.2)

On Tue, Jul 18, 2017 at 09:55:21AM +1200, Evan Hanson wrote:
> Thanks Peter, I've applied this as it is. I agree with Lemon that we
> should dry up the repeated naming logic, but for now I think we can live
> with the duplication in order to keep things moving.
> 
> The patch wasn't quite careful enough with regards to bootstrapping,
> however, and caused some problems with our use of `define-record-type`
> within core. I've added some compatibility shims where necessary to
> allow us to continue bootstrapping from the chicken-5 branch. These can
> be removed after another snapshot release.

Good catch, thanks!

> Regarding whether to namespace the core record types, I think we
> probably _should_ do so, but it's not a priority. My attitude towards
> wrapping the tags in a record type is similar; I'd be fine with that,
> but I also don't see a real need for it, so until there's a clear
> benefit to doing so or a lot of time to spare let's leave it alone.

After some thought, I believe we should do this before the release.
Given that the identifier is defined and therefore user-visible, having
it as an opaque object makes it easier to later add more stuff to it.
For example, we could add introspection information in there, that allows
things like SLIME to get the available slot names.  If people start to
rely on it being a symbol this will make things harder later on.

> I do think we should make the default record printer omit the namespace
> part of the tag, though, so that records continue to be printed as
> "#<foo>" and not "#<abc#foo>". I'll post something for this later in the
> week, unless anyone else is keen.

I'm not sure that's even needed.  This makes clear that it's the foo
defined by the abc module, so it gives more information than just "#<foo>".

Cheers,
Peter

Attachment: signature.asc
Description: PGP signature


reply via email to

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