wisp-lang / wisp

A little Clojure-like LISP in JavaScript
https://gozala.github.io/wisp/
Other
982 stars 68 forks source link

isEqual in repl #83

Closed koops closed 10 years ago

koops commented 10 years ago

I really like wisp. Clojurescript with all the Google Closure baggage is awesome.

I just installed wisp-0.9.0-beta3.tgz, and in the repl

(= 1 1)
;=> ReferenceError: isEqual is not defined

Am I missing dependency somewhere?

Gozala commented 10 years ago

Thanks @koops = is defined in the stdlib, so you need to import it, you can try following code snippet at http://jeditoolkit.com/interactivate-wisp/

(ns try.wisp
  (:require [wisp.runtime :refer [=]]))

(= 2 2)

That's because = is like _.isEqual, identity based equality check is (identical? 2 2) which does not require import and compiles to 2 === 2 in JS.

Gozala commented 10 years ago

Once #93 is fixed this would produce warnings, maybe even telling how to fix imports if module is in standard lib.