4 ms·
So the Deno runtime is written in Rust and so is all the Deno tooling... So why would you use Deno if it is not good enough for itself?
by rana1-31 5y ago
So the Deno runtime is written in Rust and so is all the Deno tooling... So why would you use Deno if it is not good enough for itself?
- lefrenchy 5y agoBecause people want to write JS/TS and want a better runtime for it?
- rana1-31 5y agoBut not just the runtime, all the tooling including linters and document generators etc why are they not written using Deno then?
- afarrell 5y agoIf you are writing for the web or building things for a different use-case than deno targets.
- rana1-31 5y agoYou are going to have to reword this, it makes no sense to me.
- lynndylanhurley 5y agoRust is not well suited for the same things as javascript / typescript / jsx / etc. Also javascript and typescript are not well suited for compilers and dev tooling. It shouldn't be seen as a negative that Deno is using rust in places where it really shines, which is a totally different use case than what deno is typically used for.
- rana1-31 5y agoOther than browser based applications why would you choose JavaScript/TypeScript etc over Rust? Developer tooling is not complicated and there is plenty of existing tools written in JavaScript, so it seems weird when they rule out there own language as not good enough. It should make anyone think twice before using Deno server side if it is not good enough for themselves.
- colordrops 5y agoThis sounds like an argument from 25 years ago. We are well past the false idea that compiled no-runtime languages are better for all use cases.
- rana1-31 5y agoWhat is a use case for an interpreted runtime language?
- atom_arranger 5y agoAPI development. People consider the performance of Node good enough, and they can use the same language for frontend and backend.
- colordrops 5y agoMuch easier and faster development and maintenance for applications that don't have strong performance or safety requirements.
- 5y ago
- dnrvs 5y agoTypescript/Deno is very ergonomic and presents a lower barrier for entry for writing web servers. However, it's a relatively large and slow to start runtime which makes it less than ideal for developer tools. You should use the right tool for the job. Not every language is good for every job or every person.
- rana1-31 5y agoI have done work on compiler, developer tooling and a lot of other stuff people would consider 'compilated' and working on those was far less complex than some business logic in API's I have had to work upon. So if the experienced developers writing Deno are using Rust for type safety etc to catch their mistakes, then why would you trust yourself to use a less strict lanaguage on a likely more complex project?
- 0xFACEFEED 5y agoMy guess: Deno would perform too slowly which would hurt the UX. It would also be harder to maintain than a language like Rust. And of course Rust doesn't need a runtime.
- rana1-31 5y agoI think you nailed it! If Deno wouldn't use itself because of reasons like this; then people should really think twice before using it to build anything server side.
- o_m 5y agoNot everything is about performance. Deno lets developers be more efficient than Rust, and it is easier to hire developers that already knows TypeScript/Node.
- rana1-31 5y agoHow is Deno more efficient?
- peferron 5y agoIf you're building a application on top of PostgreSQL and GraphQL then there's no Rust equivalent to PostGraphile, which is a JS/TS lib. If you're building on top of GCP services, there are official JS/TS libs but no official Rust libs. If you're doing data science then the ecosystem of Python libraries (another interpreted language) will get you up and running much faster than Rust. So yes, there are plenty of cases where using an interpreted language will be much more productive than limiting yourself to Rust.
- Scarbutt 5y agoThey mean more efficient for the developer not the machine.
- heavyset_go 5y agoThe Python and Ruby interpreters and runtimes are written in C. Turns out that compiled systems languages are good choices for implementing other programming languages.
- rana1-31 5y agoMy point was not the compilers/interpreters, it was the fact ALL the tooling is NOT in Deno.
- kjksf 5y agoMaybe because Deno folks are pragmatics and not fanatics. Rust is faster than V8. I'm not sure if ALL Deno tooling is written in Rust, but it makes sense to write, say, Typescript => JavaScript converter in Rust if it's 10-100x faster. All that tells you is that if you want a very fast Typescript => JavaScript converter then you too should use Rust (or Go or C++) and not JavaScript executed by V8. But writing a web app? You're free to use Rust for that as well but millions of people chose nodejs instead and those are the people that might choose Deno in the future.
- SOLAR_FIELDS 5y agoAnd indeed, you can see as a great example from the discussion on this thread how they eventually arrived at relying on Rust for most steps in the tsc toolchain: https://github.com/denoland/deno/issues/5432 https://github.com/denoland/deno/issues/5432 The conclusion reached there is as you have stated: Rust is simply an order of magnitude faster in most cases.
- heavyset_go 5y agoIMO, I don't think a single threaded and interpreted language would be a good choice for something that complex, especially for CPU bound tasks.
- oblio 5y ago99% of runtimes out there are not written in the target language.