TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Deno: What we got wrong about HTTP imports

65 pointsby Signez10 months ago

8 comments

Thro4l3110 months ago
Deno (with Typescript of course) is my &quot;smaller Rust&quot;. Whenever I don&#x27;t need the performance and efficiency of Rust, I fall back to Deno. The development speed is much higher while the result is reasonable fast and safe.<p>- Typescript (compared to other main stream languages like Go or Java) comes pretty close to Rust regarding the type system, e.g. discriminated unions (<a href="https:&#x2F;&#x2F;mkosir.github.io&#x2F;typescript-style-guide&#x2F;#discriminated-union" rel="nofollow">https:&#x2F;&#x2F;mkosir.github.io&#x2F;typescript-style-guide&#x2F;#discriminat...</a>) or null-checks as &quot;the second best version of null safety&quot;. (The best is still the option type.)<p>- Deno has an exceptional core api and std lib. Performance is great. In my experience it&#x27;s very stable (except some newer Node APIs). The tooling is great and now the move to JSR and Node compatibility widens the ecosystem while trying to make it safer. I wonder how the Deno team plans to push JSRs adoption.<p>- It&#x27;s single threaded. Yes, I think it&#x27;s a feature. Multithreading via Webworkers might not be as fast as sharing memory, but it&#x27;s much safer. I even think it has an edge over Go, if you don&#x27;t need the extra performance of Go. Go is generally faster, esp. for computations. Web stuff in Deno is fast enough as they use Hyper under the hood.<p>I really hope JSR adoption will grow.
samschooler10 months ago
This seems like a good step with import maps. Especially following web standards. I like the idea behind jsr, however I&#x27;m interested in how they will be integrating additional specifiers. I don&#x27;t philosophically like having hard coded [0] strings vs smart redirect urls. I&#x27;d be interested why jsr couldn&#x27;t have used standard smart semver following 301s to dynamically load packages, combined with an import map lock file.<p>For example:<p>`import { assertEquals } from &quot;jsr:@std&#x2F;assert@1&quot;;`<p>could be:<p>`import { assertEquals } from &quot;jsr.io&#x2F;std@1&#x2F;assert&quot;;`<p>With this deno could assume https, as well as follow configs&#x2F;redirects to get the correct import, then lock those correct paths using import maps (the logistics of this would need hashing out, but it doesn&#x27;t seem impossible considering they do it with the &quot;special&quot; `jsr:` specifier).<p>It seems like this would maintain the same pros while avoiding the &quot;special&quot; specifier hard coding that exists now (seems to only be for npm: and jsr: right now; no github: for example).<p>[0]: <a href="https:&#x2F;&#x2F;github.com&#x2F;denoland&#x2F;deno&#x2F;blob&#x2F;8c2f1f5a55a2a9bb9e04c12236faa341b3fd49b6&#x2F;cli&#x2F;tools&#x2F;registry&#x2F;pm.rs#L165">https:&#x2F;&#x2F;github.com&#x2F;denoland&#x2F;deno&#x2F;blob&#x2F;8c2f1f5a55a2a9bb9e04c1...</a>
评论 #41104594 未加载
tengbretson10 months ago
Introducing the revolutionary new JS runtime &quot;Endo&quot;.
评论 #41103479 未加载
评论 #41102716 未加载
frankjr10 months ago
Not sure if that&#x27;s any simpler than having the good ol&#x27; package.json at this point.
评论 #41103874 未加载
评论 #41101930 未加载
评论 #41101629 未加载
mplewis10 months ago
It looks a lot like they ended up back at a solution that looks like package.json with npm.
评论 #41102941 未加载
m_sahaf10 months ago
Ha, in what I believe Ryan&#x27;s first talk about Deno, he mentioned something about avoiding cute features or so, then he said Deno has URL-based imports &quot;because they&#x27;re cute&quot;. It didn&#x27;t take long for someone to raise it up in 2018:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;denoland&#x2F;deno&#x2F;issues&#x2F;195">https:&#x2F;&#x2F;github.com&#x2F;denoland&#x2F;deno&#x2F;issues&#x2F;195</a><p>We&#x27;ve come full circle :)
评论 #41104945 未加载
xmonkee10 months ago
We are using deno to allow our customers to run custom code with imports. This is only made possible with http imports and I for one am very happy it exists.
评论 #41124033 未加载
pjmlp10 months ago
And yet again some folks rediscover why network based imports isn&#x27;t something that works beyond toy examples.<p>What about reading about what we were doing in distributed computing during the last century?