Earlier quoted context omitted.
This doesn't make sense to me. Javascript is a breath of fresh air after writing async code in almost every other ecosystem from Go to Java to Python to Swift. Pretty much any async code snippet in those languages can be improved by porting it to Javascript. Async/await + the ubiquitous Promise make it my go-to choice for writing anything networked. Especially over the other popular dynamically typed languages.
I dislike javascript for much the reason you love it. Promises just mean having to manually build and manipulate cooperatively multitasking green-threaded call-stacks. It was a dirty necessity following the inability of the earlier callback patterns to manage the level of complexity people were attempting to express in the language.
What the Hell Is a Deno?
71–80 of 151 posts
Re: What the Hell Is a Deno?
#72Earlier quoted context omitted.
This is 100% true especially stupid libraries that are someone's class project. And JavaScript developers are so used to dependency hell that one of my developer imported 3rd party package for date formatting.
JS's built in date formatting/handling is terrible and often do what needs to be one. MomentJS may be a giant import, but it works an it works really well.
[1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
Re: What the Hell Is a Deno?
#73Earlier quoted context omitted.
It’s the closest thing we have to a useful standard library. Date handling in js without a library is a code smell.
I am confused, are you using MomentJS for fancy output like 3 days ago etc or for simple output like 5/31/2020? I can see how it is useful in former case but seems overkill in later case.
new Intl.RelativeTimeFormat("default").format(-3, "day")
1: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...Re: What the Hell Is a Deno?
#74Earlier quoted context omitted.
Because in those languages: . dependencies are carefully considered by users . dependencies are not added recursively . dependencies try to be dependency-free themselves to assist with the previous point . dependencies are not blindly nor automatically updated . dependencies solve important domain problems, they are not trivial one-line-functions . dependencies are typically developed and tested by a known team or co…
the parent said something about problems being solved if there was a standard library, and if perhaps there were a standard library people would be willing to write more code instead of just adding another dependency. I believe these points dependencies are carefully considered by users dependencies try to be dependency-free themselves to assist with the previous point dependencies solve important domain problems, th…
Re: What the Hell Is a Deno?
#75> Javascript is great. But... in saying that it has a few quirks and can work in some unexpected ways. Typescript has just as many[1] (in fact more, as it's a superset) quirks than Javascript. I like using it (and it makes JS type-safe-ish), but it's not really some kind of paradigm shift. Not sure how I feel about import maps. They are quite literally the same thing as package.json. In fact, converting between the t…
Re: What the Hell Is a Deno?
#76Deno is the Java-fication of JS. I'm sure there will be Node-like tide of "JS is better than Java now that we have X" even though Deno brings JS closer than ever to Java. Despite being cynical, I don't think its a bad thing. Java does a lot of things right. Deno -> Java Runtime security options -> Security Manager. URL based packages with simple HTTP-> Maven works same way. Bigger standard library -> Java's is huge.…
Re: What the Hell Is a Deno?
#77> Javascript is great. But... in saying that it has a few quirks and can work in some unexpected ways. Typescript has just as many[1] (in fact more, as it's a superset) quirks than Javascript. I like using it (and it makes JS type-safe-ish), but it's not really some kind of paradigm shift. Not sure how I feel about import maps. They are quite literally the same thing as package.json. In fact, converting between the t…
Frankly I find TypeScript with strict mode turned on to be a safer and saner than C# and Java because of explicitly nullable types alone. I _never_ get null pointer exceptions in my own TypeScript code. Combined with fairly strict ESLint you get something that catches a lot of problems at compile time. Of course it's still far cry from being as safe as for example Rust. And yeah the inconsistency of JavaScript/TypeSc…
For lower C# versions and Java you can get your strict mode turned on via static analysis tools.
I have been using Sonar on CI/CD builds since 2008. Static analysis errors break the build, plain and simple.
Also quite convenient for writing sane C and C++ code by the way.
Re: What the Hell Is a Deno?
#78Another nitpick which may be totally invalid and I'm open to being educated on this. It seems odd (i.e. inaccurate) that, at the end, the myProgram.bundle.js is being called an "executable binary." It's just minified JavaScript. Is it a binary because it has been minified and optimized, or is all JavaScript suddenly considered "binary?"
Re: What the Hell Is a Deno?
#79This means that if I write an application that requires filesystem access and has external dependencies, I'm essentially giving them access to the filesystem even if they don't need it.
These dependencies could silently check whether they have permissions and do something fishy only if that is the case.
It would be nice to be able to import dependencies in a nested sandbox but I guess it is not a simple problem.
Re: What the Hell Is a Deno?
#80Earlier quoted context omitted.
I dislike javascript for much the reason you love it. Promises just mean having to manually build and manipulate cooperatively multitasking green-threaded call-stacks. It was a dirty necessity following the inability of the earlier callback patterns to manage the level of complexity people were attempting to express in the language.
As someone with most of my coding experience in JS/TS, what would you say is a good alternative to explore?
At least it was the one that was easiest for me to wrap my head around and actually improved the performance of my code without weird race conditions or bugs.