Hi there,
Is there a standard/recommended way to handle multiple versions of Racket
in library code?

For instance, this handy utility was added in a recent version of Racket:

https://docs.racket-lang.org/reference/strings.html?q=strings#%28def._%28%28quote._~23~25kernel%29._string-append-immutable%29%29

I'd like to use it in my library code but that would probably mean that
users with an older version of Racket wouldn't be able to use the library,
is that right? I'm tempted to add something like:

(require version/utils)
(define string-append
  (if (version<? (version) "7.5.0.14")
      (compose string->immutable-string string-append)
      string-append-immutable))

... at the top of the module. Is this advisable? Or is there a better,
maybe more raco-friendly way?

Thanks,
-Sid

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CACQBWFkRahhtoXKUbpcJ%2BHpYwq5FBU85Ze_NGkEntXX3kTD01g%40mail.gmail.com.

Reply via email to