Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable use of cond-expand depending on SYS_PLATFORM. #263

Merged

Conversation

0-8-15
Copy link
Contributor

@0-8-15 0-8-15 commented Sep 6, 2019

This change allows to use things like
(cond-expand
(android ...code applicable on android targets only...)
(linux ...code applicable on linux targets only...)
(else ...code applicable on all other targets...))

NB:

  1. According to SRFI-0 cond-expand is only mandatory on top level.
  2. Most Scheme implementations (i.e., all I know of), including gambit
    allow the use of cond-expand everywhere.
  3. With this change all uses of app:android? at runtime could
    eventually be replaced by compile time code expansion.

This change allows to use things like
   (cond-expand
    (android ...code applicable on android targets only...)
    (linux ...code applicable on linux targets only...)
    (else ...code applicable on all other targets...))

NB:

1. According to SRFI-0 `cond-expand` is only mandatory on top level.
2. Most Scheme implementations (i.e., all I know of), including gambit
   allow the use of `cond-expand` everywhere.
3. With this change all uses of `app:android?` at runtime could
   eventually be replaced by compile time code expansion.
@mgorges
Copy link
Contributor

mgorges commented Sep 7, 2019

Again not a feature I ever used and from a cursory review it only seems to be mentioned in the ‘ssax’ module and something you recently contributed. What is the performance hit we take when enabling this and does it break anything in terms of recompilation or other default behaviour?

@0-8-15
Copy link
Contributor Author

0-8-15 commented Sep 8, 2019 via email

@mgorges mgorges merged commit af3286c into part-cw:master Sep 24, 2019
@0-8-15 0-8-15 deleted the define-cond-expand-feature-for-sys-platform branch September 25, 2019 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants