musictheory / NilScript

Objective-C-style language superset of JavaScript with a tiny, simple runtime
Other
50 stars 5 forks source link

NPM "nilscript" package does not contain redesigned compiler? #162

Closed IngwiePhoenix closed 5 years ago

IngwiePhoenix commented 5 years ago

Hello!

I just tried out NilScript and wanted to show it to a friend, but encountered that the global is still $oj_oj.

$oj_oj._registerClass({$oj_c_Speaker:1}, null, function($oj_s, $oj_m) { function $oj_c_Speaker() { this.constructor = $oj_c_Speaker;this.$oj_id = ++$oj_oj._id;}

$oj_s.$oj_f_speakThis_ = function(msg) {
  console.log("hawwo! I shall say: " + msg);
};

return $oj_c_Speaker;});

$oj_oj.msgSend($oj_oj._cls.$oj_c_Speaker,{ $oj_f_speakThis_: 1 },"meep meep!");

I installed via npm i -g nilscript...so I am a little bit surprised here :)

iccir commented 5 years ago

The rename of the global from $oj_oj is #142, which is part of 3.0 (and only on the 3.0 branch at the moment).

IngwiePhoenix commented 5 years ago

Ahh, okay! Thanks :)