Opened 7 years ago

Closed 6 years ago

#106 closed defect (fixed)

conditional code selection

Reported by: alexshinn Owned by: alexshinn
Priority: major Milestone:
Component: WG1 - Core Keywords:
Cc:

Description

As discussed in

https://groups.google.com/group/scheme-reports-wg1/browse_thread/thread/99c05dcb6a500183

users invariably want some way to conditionally
select code depending on the implementation and/or
feature set available. SRFI-0 provides cond-expand,
R6RS implementations informally provide a library
naming hack, and numerous other personal hacks exist.

Do we want to include something along these lines
in WG1 Scheme?

Change History (3)

comment:1 Changed 7 years ago by medernac

Definitely yes, we need a standard way to inspect the availability
of optional features and select code accordingly. There already are many existing proposals, this is either a module feature or a meta-language feature:

  • SRFI-0 defines a registry of "feature identifiers" and a 'cond-expand' form.
  • SRFI-55 has 'require-extension'
  • SLIB has 'require / provided? / provide' forms
  • Modules systems have their import mechanism
  • There are also configuration languages such as Scheme48, Racket, etc.

comment:2 Changed 7 years ago by arcfide

I want to mention meta-cond which I think is a particularly nice and general solution. I think we could make it work.

comment:3 Changed 6 years ago by cowan

  • Resolution set to fixed
  • Status changed from new to closed

WG1 decided to go with CondExpandCowan.

Note: See TracTickets for help on using tickets.