jscl-project / jscl

A Lisp-to-JavaScript compiler bootstrapped from Common Lisp
https://jscl-project.github.io
GNU General Public License v3.0
886 stars 109 forks source link

Use portable common LISP #317

Open HenryS1 opened 6 years ago

HenryS1 commented 6 years ago

JSCL uses some SBCL specific functions. It looks like it's only a two calls to sb-posix:getenv in toplevel.lisp (lines 266 and 267). If that's all it is then I don't think it'll be hard to make the implementation portable, but it requires a bit more investigation.

davazp commented 6 years ago

What if we create a impl.lisp file and put every usage of implementation-specific functions there?

Like

(defun getenv (name)
  #+sbcl (sb-posix:getenv "...")
  )

Then it would be pretty easy to port them to other implementations.

HenryS1 commented 6 years ago

Agreed, that looks like the right approach to take.