jank-lang / jank

The native Clojure dialect hosted on LLVM
https://jank-lang.org
Mozilla Public License 2.0
1.69k stars 50 forks source link

Implement delay object and macro #118

Closed jeaye closed 1 week ago

jeaye commented 1 month ago

This will follow Clojure's delay (Delay.java). Community docs: https://clojuredocs.org/clojure.core/delay

We already have support for @ and deref, but force and delay don't exist yet.

  1. Create a new object_type for delay (under reduced)
  2. Add a case for delay under reduced in visit_object
  3. Copy volatile.hpp into delay.hpp and implement deref
  4. Add delay and force to clojure.core
jianlingzhong commented 1 month ago

will take this one.

jianlingzhong commented 1 week ago

https://github.com/jank-lang/jank/pull/123 should have completed this feature.

jeaye commented 1 week ago

Yep. In the PR, you can add "This closes #nnn" and Github will do it for us automatically.