guile-devel
[Top][All Lists]
Advanced

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

Re: TODO list for Guile R7RS support


From: Ludovic Courtès
Subject: Re: TODO list for Guile R7RS support
Date: Mon, 13 Feb 2012 12:50:37 +0100
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.93 (gnu/linux)

Hi,

Alex Shinn <address@hidden> skribis:

> On Mon, Feb 13, 2012 at 8:46 AM, Ludovic Courtès <address@hidden> wrote:

>> Alex Shinn <address@hidden> skribis:
>>
>>> On Sat, Feb 11, 2012 at 12:53 AM, Ludovic Courtès <address@hidden> wrote:
>>>>
>>>>> * R7RS feature identifiers: r7rs, exact-closed, ratios, exact-complex,
>>>>>   ieee-float, full-unicode, windows, posix, unix, darwin, linux, bsd,
>>>>>   freebsd, solaris, i386, x86-64, ppc, sparc, jvm, clr, llvm, ilp32,
>>>>>   lp64, ilp64, big-endian, little-endian, guile, guile-2, guile-2.0
>>>>
>>>> I wonder how these are specified.  Does a *-kfreebsd-gnu build have
>>>> ‘freebsd’?  And ‘bsd’?  Do *-gnu* have ‘linux’ defined, even when Linux
>>>> isn’t used?  Does Cygwin have ‘unix’?
>>>
>>> First note the list of feature identifiers is one of the
>>> things most likely to be trimmed in the next draft.
>>
>> Good.  :-)
>>
>>> There is no "gnu" feature proposed in R7RS,
>>
>> That would be for GNU, aka. GNU/Hurd.
>
> Wouldn't the feature be better named "hurd" then?

Well, no, because the operating system is called “GNU”, or “GNU/Hurd”
(“the Hurd” designates the “kernel”, not the OS.)

> How can a system be both Hurd and Linux?

For GNU/Linux, one could imagine adding a ‘linux-gnu’ symbol, for
instance.  Likewise for GNU/kFreeBSD.

>>>> And above all: are people going to write #ifdef __linux__ish code when
>>>> what they mean is #ifdef __GLIBC__ or even something different?
>>>
>>> This particular analogy doesn't apply.
>>
>> IMO it applies in the sense that, as with C code, people will check for
>> ‘linux’ when what they really care about is what the libc provides, or
>> whether the core utilities support --color, etc.
>
> Yes, but you're talking about C features, when we
> only have to worry about Scheme features, so I need
> more relevant examples to be able to give explanations
> or take corrective action.

These aren’t necessarily C features.  I think one has to think about
what these features would be used for.

I’m quite confident that in many cases people would be checking for,
say, ‘linux’, when what they’re interested in is a particular feature of
the GNU/Linux environment, not specifically the kernel; or they’d be
checking for ‘unix’ when what they want to know is whether to use slash
or backslash to separate path components; etc.

In general, I think fine-grain feature checks should be encouraged over
coarse-grain identity checks, because it’s likely to be more robust.

Thanks,
Ludo’.



reply via email to

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