4 ms·
Somewhat silly question... why not write BSC in JS? I mean, this seems like something that would be a natural fit in a NodeJS environment, and tying into NPM s
by tracker1 13y ago
Somewhat silly question... why not write BSC in JS? I mean, this seems like something that would be a natural fit in a NodeJS environment, and tying into NPM similar to CoffeeScript, Less etc.
I don't mean to come across as an ass, just curious. Though, I do think what you are doing could be a natural extension to CoffeeScript itself.
Also, I would suggest having an htmlEncode(variable) by default, I know that htmlEncode isn't a built-in JS method, but you should want to escape html entities.
- maxhowell 13y agoYes with hindsight I wish I had written it in JS, but writing the BS compiler was something I wanted to get done fast, and I'm more proficient with Ruby. BS has the #x{foo} syntax for htmlEncoding, or did you mean that should just be the default?
- tracker1 13y agoI didn't notice the #x{foo}, though was thinking that should be the default (safe-first), and if you want unsafe/raw have that be explicit.