7 ms·
That explains why it's not used in production. What I don't understand is why the idea of replacing Javascript with something better hasn't been embraced. Maybe
by andreasvc 12y ago
That explains why it's not used in production. What I don't understand is why the idea of replacing Javascript with something better hasn't been embraced. Maybe Dart isn't actually better but I don't see anyone arguing that and that is the interesting substantial question.
- u124556 12y agoJavascript is being replaced by newer (hopefully better) Javascript. That's they only thing browser vendors can get in agreement. There's plenty of other javascript compilers for plenty of languages.
- freehunter 12y agoI really wish there way a way of coding for the web that didn't require [backend language] + [front end language] + Javascript (might be the same as previous two) + HTML + CSS. If I want to write a website in Python, I still need to know Javascript, HTML, and CSS, so why bother with Python?
- bad_user 12y agoDon't use Python then. Prefer a language that has compilers targeting Javascript instead. Candidates that I have tried: Clojure & Scala. And I'm sure there are others. People don't talk that much about it because Javascript being used as a compilation target is a fairly new trend.
- ecspike 12y agoThere are some GWT-like things for Python, pyjs and pyjamas. Doesn't get you away from CSS though.
- riquito 12y ago> If I want to write a website in Python, I still need to know Javascript, HTML, and CSS, so why bother with Python? Because you don't want to write your backend in Javascript and you prefer a different language. You don't have to know well only one language in your lifetime.
- hcarvalhoalves 12y ago> If I want to write a website in Python, I still need to know Javascript, HTML, and CSS, so why bother with Python? Libraries. Backend code can be quite different than frontend depending on your requisites. E.g., there's no SQLAlchemy for Node. HTML and CSS are quite different things, you can't escape that.
- freehunter 12y agoSorry, I should have mentioned the "why bother with python" was rhetorical. I know the answer, I was just expressing frustration at the barrier to entry that doesn't need to exist.
- zo1 12y ago"If I want to write a website in Python, I still need to know Javascript, HTML, and CSS, so why bother with Python?" Right tool for the right job. That's why I don't think you should use css on the server! Or haskell on the client's browser!
- efnx 12y agoCan you elaborate on why Haskell is not appropriate for the browser? Just for clarification, it is a general purpose language whereas CSS is not.
- zo1 12y agoNo particular reason. It was the first example language that popped into my head when I was thinking of "what language do I think really doesn't belong in a client browser". i.e. my personal opinion. I'm sure it's a perfectly valid option to put in the browser, though.
- efnx 12y agoI agree with you that you should use the right tool for the job. No CSS on the server :) There are a couple of projects (ghcjs, fay, purescript, haste) that make it possible to write Haskell for the browser. After maintaining JS libraries with a team over the past three years I've come to wish for Haskell's type system and compiler. It would make my job much easier. :)
- robin_reala 12y agoBecause: # JS has shown surprising legs when it comes to performance improvements # For a competitor to become popular it’d have to persuade every browser manufacturer to implement it # Once implemented it’d have to wait for multiple years for devices in the market to implement it # Older devices are slower devices, so having a compiles-to-JS version that lags in performance for older devices isn’t tenable either. Basically, it makes more sense to increase the local maximum than any other path.
- tosh 12y ago> # For a competitor to become popular it’d have to persuade every browser manufacturer to implement it IMHO this is a misconception. Dart compiles to JavaScript with decent performance of the generated code. In some cases even faster than comparable hand-written JavaScript (see: http://dartlang.org/performance http://dartlang.org/performance). JavaScript engines getting faster also means that Dart code compiled to JavaScript is getting faster. It is a win-win scenario. Even if other browser vendors won't ship a Dart VM tomorrow the situations is pretty awesome performance wise. Once Chrome ships a Dart VM a huge user base gets even better and more predictable performance characteristics than would be possible in JavaScript which is incredible but I don't see the browser vendor support/performance angle as a real show-stopper for Dart. You don't give anything up when you use Dart, you can still call JavaScript libs if you need to (e.g. we do use PubNub.js at https://www.blossom.io https://www.blossom.io and we use it from Dart without any problems).
- bad_user 12y agoI don't think Dart is better. It is better in some ways, but it's not enough. You're not seeing arguments because currently people don't care. Thing is, Javascript works as a target for other languages. For example ClojureScript and Scala.js are examples of compilers targeting Javascript, amongst many others. So people that want an alternative to Javascript already have options. From a technical point of view, I think Google made a mistake in designing a new language, instead of a new VM that could be used as a more efficient target for multiple languages, because even though Google tried copying the good parts of Javascript's story, you can't beat the incumbents at their own game. And from a social perspective, Dart is seen as an attempt to fragment the web, so Google's handling of the situation was poor.
- zevyoura 12y agoDart does have a new VM (that's what Dartium uses after all), and it would probably make for a better compile target than JS since it has strong typing, better number types, etc.