News for hackers. Stuff that matters.
Re:Deno 1.9 by sroussey on Tuesday April 13, 2021 @08:41PM (#26801591)
Wouldn’t this work?

import { Oak: {Function1, Function2} } from "./deps.ts";

Re:Deno 1.9 by joelg236 on Tuesday April 13, 2021 @08:47PM (#26801629)
This isn't valid syntax, no
Re:Deno 1.9 by jessaustin on Wednesday April 14, 2021 @08:50AM (#26806334)
This is a regression. This was possible with "require" and destructuring assignment.
Re:Deno 1.9 by goldenkey on Wednesday April 14, 2021 @10:23AM (#26807481)
I don't know why you are getting downvoted. I agree. The difference is that ES6 imports are meant to be more optimized and also can allow for async/top-level async modules. I believe part of the additions of ES6 modules made it harder to treat the right hand side like a complete object that can be destructured. In summary, it's not the syntax, it's the difference in feature richness between ES6 and CommonJS importing.
Re:Deno 1.9 by jessaustin on Wednesday April 14, 2021 @03:21PM (#26811803)
Yeah, I'm not saying that import was a mistake or even a good idea done in the wrong way. I use "import" whenever I can in my own code. It could be impossible to import only the particular things one needs, and that trusting tree-shaking is the best we can do. However, it very much seems like a first version to me, and that import statements could be made smart enough to destructure.
Re:Deno 1.9 by sroussey on Wednesday April 14, 2021 @12:39PM (#26809521)
Yeah, was afraid it might be bad ES6. But this is Delo, so they can do whatever they want.
Re:Deno 1.9 by Soremwar on Wednesday April 14, 2021 @03:31PM (#26811911)
No they can't, Deno is JavaScript compliant