[prev] [thread] [next] [lurker] [Date index for 2005/04/09]
> Oh for fuck's sake, all I want to be able to do is load other .js files > so that I can modularize things and appropriately manage dependencies. That's not something I would even expect to be defined in the language, any more than "#include <stdio.h>" is defined in C. Javascript is not inherently a scripting-oriented language with "eval" baked into its bones the way Forth or Lisp or Tcl is, or even an intermediate language like Perlm so embedding filenames and URIs into executable code is not a natural way to do things. Yes, it has an eval, but the languge is not inherently designed to be composed and evalled, the way Lisp- and Forth- family languages are. It's even worse at that than SQL is. I would expect you'd do something like this: <script source="includefile.js"></> <script source="anotherinclude.js"></> <script source="code.js"></> And use the module management that's built up around JS, in this case at the HTTP/HTML level, take care of it. The real problem here is that HTML, which is where the stuff you're trying to do lives, doesn't have <include source="something.html"/> So you need server-side scripting to suck in the above series of refs. But you DO have that, don't you? If not, then hate the webserver and then build your webpages outside of it.There's stuff above here
Generated at 12:00 on 12 Apr 2005 by mariachi 0.52