"Adam D. Ruppe" <destructiona...@gmail.com> wrote in message news:arowwzayimwhzmqah...@forum.dlang.org... > On Friday, 2 March 2012 at 05:58:03 UTC, Nick Sabalausky wrote: >> You make it sound as if there's another kind of JS. > > Horribly inefficient relative to the environment :P > > I just don't want 100 kb of crap to download just to > write a hello world. >
Heh, yea. That's why, even though I use Haxe, I don't use it for generating JS (unless I wanted to do a Flash-style HTML5/canvas thing). > A lot of people prefer to use gzipped sizes, but I don't > because the browser still has to parse the whole thing, > and that takes time after the download, even if you don't > actually run any of it. > > (On some browsers, it parses it again on every page load!) > > > This generated D code gzips very, very well, but I still > want to keep it small in general for general speed. > > The fastest code is no code at all. Less to parse, less > to run. Suggestion: Allow all D features even if it requires...inefficient-er...boilerplate, BUT then have a system similar to @safe/@trusted/@system (or maybe just a "pragma(SimpleJS)") so a developer can selectively turn on "Disallow any D features that would result in extra-inefficient JS output" at the module-level (and/or whatever other granularity @safe works on).