3 ms·
It's interesting to hear that Dart was designed as a general-purpose language. I always assumed that Dart was kind of like Coffeescript, that it was only meant
by dom96 11y ago
It's interesting to hear that Dart was designed as a general-purpose language. I always assumed that Dart was kind of like Coffeescript, that it was only meant to be translated into JavaScript.
I'm curious how this fits in with Go, another programming language from Google, which is also presumably a general-purpose language. Can anybody compare Go and Dart?
- oblio 11y agoDart was meant to be a general-purpose language from day 1. I think they were always working on the standalone, server VM in parallel to the Javascript translator/compiler/transpiler/whatever it's called these days.
- filiph 11y agoI see Go as a systems language and I think it was designed that way (wikipedia agrees with me here but I don't know enough about it so I'm not claiming this to be true). AFAIK it's used mostly for server / CLI stuff, where its concurrency model and speed shines.
- danieldk 11y agoI do write a lot of Go and it fits in the Oberon/Modula-2/C family. It is a general purpose language and the design of the language does not really make it a system language. In fact, one could argue that many properties that people expect of a system language (e.g. no GC) are missing. Currently, Go is indeed popular for network services and command-line tools, but I think that is due to it's standard library supporting those use-cases well. But Go will surely branch out as its ecosystem matures.
- shurcooL 11y agoIt's especially interesting because you can also compile Go to JavaScript, and Go already runs natively on iOS and Android.
- rbehrends 11y agoDart was always designed to have its own VM. Compiling to Javascript was more of a necessary evil. Google's vision with respect to Dart in the browser was to have a more powerful VM rather than persistently piggybacking on a Javascript VM (this was what Dartium was about). Even now, the current VM supports state snapshotting, isolates, and native/transparent big integers [1], neither of which you can get out of a compiler that generates Javascript, unless the Javascript backend already supports it. Compilation to Javascript is still possible and useful, but you inevitably lose some Dart VM features in the process. Ironically, Ceylon now supports a Dart backend. In short, Dart is both a language and a platform, though the language can also be used to target other platforms. [1] In general, it's pretty obvious that several of the Dart developers have a Smalltalk background.