5 ms·
We'd be better off without JavaScript embedded into Websites and PDF files. Granted, it adds functionality, but if you've ever tried to keep hundreds of Microso
by 16s 16y ago
We'd be better off without JavaScript embedded into Websites and PDF files. Granted, it adds functionality, but if you've ever tried to keep hundreds of Microsoft Windows PCs from being infected with malware, you'd understand. Things are simpler without it.
- cryptoz 16y agoJust because one OS has security problems doesn't mean the world would be better off without this amazing functionality. I think JavaScript embedded in websites is one of the most important abilities in the web today. It's critical to the way nearly all modern applications are written and it allows for extremely fast and rapid development of scalable powerful applications. Awesome, no?
- kenjackson 16y agoWhile Javascript is better than nothing, I'm one of the few proponents left of a strong, lightweight, maybe standardized, plugin model. I'd rather write with an appropriate language for the task at hand. If my site would best be served by Lisp, or Haskell, or Java, or Javascript, or C#, or Python... let me decide. It just feels like we've entered this world that everything has to be Javascript, if its appropriate or not.
- cryptoz 16y agoBut then your site will only work with people who have installed the plugin that you depend on! That model doesn't seem like it would work very well to me, since there's no way every single browser will have support for 30 different scripting languages. There'd be a plugin-hell; it's much better if we all standardize on a language like we have.
- kenjackson 16y agoThe point you have is a valid one, but I feel like it shouldn't be. For example, the fact that you say there'd be plugin-hell with 30 plugins is crazy. A good management system should be able to efficiently handle hundreds or even millions of components. And what if we standardized support for the scripting languages? So, for example, the DOM calls looked like RESTFUL services returning JSON. And maybe there was a low-level, but efficient virtual machine that everyone could target (someone mentioned LLVM -- although I really don't care what it is all that much). It just feels like the web is in this weird cycle where we continue to make suboptimal choices... largely because that's how it was done the first time.
- DanielRibeiro 16y agoOr you can just compile a language you want to javascript. Treat it like assembly. You can be glad it works, but you'd rather not write in it directly. Examples of such: coffescript (http://jashkenas.github.com/coffee-script/ http://jashkenas.github.com/coffee-script/) for those who like python/ruby, ruby (though this is not perfect: http://stackoverflow.com/questions/3593312/production-usage-of-compiling-ruby-red-to-javascript http://stackoverflow.com/questions/3593312/production-usage-...), GWT (somewhat butchered java -> javasscript) and scriptjure (http://github.com/arohner/scriptjure http://github.com/arohner/scriptjure Clojure -> javascript).
- auxbuss 16y agoAlso, Fantom can generate javascript http://fantom.org/ http://fantom.org/
- contextfree 16y agoIf we're going to be doing that, wouldn't it maybe be better to compile to something that was actually designed as a compilation target (like the JVM/CLR - which are apparently the dread scourges JavaScript saved us from - or LLVM) rather than roping in an HLL not designed for the job?
- DanielRibeiro 16y agoThe JVM wasn't originally createf for other languages as well. I agree it would be great if a vm such LLVM was builtin on all browsers. It is not, as specs that move the a better web development environment are not as aggressive as one would like, both in design and (even more prominently) in implementation. The thought that developers should wait for browsers to catch up with their needs is what leads to such situation. But, if the JVM finally decided to host other languages, after they got a lot of attention, maybe so will browsers. But we need to justify it first. Not wait.
- gorog 16y agoAnd leave the Web as a set of static pages like in the nineties? Web applications are desirable, if only because they're multi-platform. Javascript is what saved us from those slow and not so safe Java applets (and Flash, Silverlight, which would be everywhere without Ajax). Anyway, malwares would have spread through downloaded executables (e-mail attachments, etc). Is Javascript even helpful to most malwares?
- 16s 16y agoIs Javascript even helpful to most malwares? Yes, very much so. Adobe PDF reader's JavaScript ability is the reason it's dangerous to open PDF files anymore. They issue a new patch once a month it seems and are working on a sandbox as the problem cannot be contained. Without JavaScript embedded in the PDF files, this would be a much more manageable issue.
- InclinedPlane 16y agoRealize that the answer to an absence of Javascript would probably be more Flash and ActiveX, which is actually a much worse security problem.