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: Evan Hanson
Subject: Re: [Chicken-hackers] [PATCH] Fix record type tags to be nonglobal by module-prefixing them
Date: Wed, 19 Jul 2017 11:28:20 +1200

On 2017-07-18  8:30, Peter Bex wrote:
On Tue, Jul 18, 2017 at 09:55:21AM +1200, Evan Hanson wrote:
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.

If you feel strongly about it then that's fine with me. Let's worry
about the introspection later, though. There'll be enough work in the
"simple" version already ( updating srfi-4, updating the record-instance
procedures,updating how records are described in csi, and so 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>".

I really think we should hide the hash prefixing as much as possible.
It's an implementation detail and not something users should interact
with directly. The right way to distinguish these things is through the
module language.

Evan

Attachment: signature.asc
Description: PGP signature


reply via email to

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