[prev] [thread] [next] [lurker] [Date index for 2005/04/10]
On Sat, Apr 09, 2005 at 06:09:06PM -0500, Peter da Silva wrote: > > Well for god's sake, could they stop adding new ways to make things rotate > > for a second and add one useful function to the language?! > > > function include(source) { > > document.write("<script source\"" + source + "\"></script>"); > > } > > Because this is done at EXECUTE time, and prevents you from writing a JS > compiler EVEN IF YOU WANTED TO. I was thinking about this some more and it occured to me.. since the above is an extension to the DOM, not the core language, it assumes its going to be running inside a web browser: a trusted environment on an unknown platform. You don't want to be shipping machine code. Best you can do is byte-code to be run through a VM. The byte-code compiler can spot the include()s and compile them as well. You would have to include the limitation that include() only takes a static string, not a variable, but that's ok by me.There's stuff above here
Generated at 12:00 on 12 Apr 2005 by mariachi 0.52