wisp-lang / wisp

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

func and func! compile to the same name #146

Closed hackergrrl closed 8 years ago

hackergrrl commented 8 years ago

This might be avoided by mapping ! -> BANG, which is a relatively uncommon suffix. This would allow programs like

(defn inc [x] (+ 1 x))

(defn inc! [x] (set! x (inc x)))
var inc = exports.inc = function (x) { return 1 + x }

var incBANG = exports.incBANG = function (x) { x = inc(x) }
Gozala commented 8 years ago

It was intentional, idea was to have a convention of referring to functions that perform mutations with ! prefix regardless if they were from JS or wisp. It was also making JS interop nicer as calling incBANG from JS would be awkward.

That being said this project is abandoned (see https://github.com/gozala/wisp#project-is-abandoned) so unsell someone takes ownership of it there's no point in issue reports.

hackergrrl commented 8 years ago

I'm contemplating doing some work on it. Is me filing issues here causing noise for you? I can track them on my fork if you'd prefer.

Gozala commented 8 years ago

@noffle no I don't mind that, I just wanted to make sure you were aware of the current status.

hackergrrl commented 8 years ago

Thanks for the heads-up and for not minding -- appreciated.