const
They don’t do it well, but an attempt was made.
const
They don’t do it well, but an attempt was made.
To be fair, that’s an issue in almost every imperative language and even some functional languages. Rust, C, and C++ are the only imperative languages I know of that make a serious effort to restrict mutability.
For those who, like me, have never heard of a .gitkeep file: https://stackoverflow.com/questions/7229885/what-are-the-differences-between-gitignore-and-gitkeep
Why are we looking for new technologies?
Why are we writing new software? There’s plenty already.
Ok, but have they fixed the UI scaling on high-DPI displays?
Ok, but have they fixed the UI scaling in high-DPI displays?
But think of the illiterate people! /s
And being a nightmare to figure out what code is whereas they all communicate independently.
So much this. Especially in a larger company it can be basically impossible to find the code that implements an endpoint, and of course even if you can find it you can’t trace it in a debugger.
For an application? Never. I’d still use it for something very small like a build script where the hassle of separate compile and run stages makes the whole thing a hassle to use. That might change now, though, since I think Node has gained the ability to execute Typescript directly.
I think a better solution would be to add a method called something like ulock that does a combined lock and unwrap.
My concern with lock+unwrap is only partly because of convenience; I also didn’t like it because I think it’s a bad idea to get people used to casually calling unwrap, because it tends to hide inadequate error handing.
Now that I think about it, I don’t like how unwrap can signal either “I know this can’t fail”, “the possible error states are too rare to care about” or “I can’t be bothered with real error handing right now”. In one or two of those cases you want to leave it in my production code, and in the last you want to audit all instances and replace them with proper error handing. Using the same function for all three cases makes that difficult.
Typescript and JavaScript are different languages and the distinction is important, especially because the two are used in conjunction with each other.
try_lock
already exists; it’s called lock
. I just want a more convenient name and I want the name of the new method to be lock
, but that ship has sailed.
Looks like the author missed my main complaint about Rust mutexes, which is that the lock
method returns a Result
. There should be a try_unlock
method for when someone actually wants to handle the rather obscure failure case, and the name lock
should be used for a method that panics on failure but returns a value that doesn’t need to be unwrapped first. I see the current arrangement as being about as sensible as having array subscripting return a Result
to handle the case of a failed bounds check.
The newer version is: https://w3c.github.io/openscreenprotocol/
I used to be on that team at Google and when I left they were working on an open source implementation of it.
Miracast is a separate, older protocol from what Chromecast uses.
I didn’t think you realize just how much code is written in JavaScript these days.
🤡
Everything in the video is considered acceptable in open source code today. If it wasn’t, it wouldn’t have been right there in the code for the person making the video to find it.
I’m old enough to remember when 4 of those 5 languages were the hot new thing. You’d have had me ignore them all and keep using C for everything. If I had done that I wouldn’t have even landed my first job.
Oh please. This comment has the same energy as Dave Chappelle doing a whole Netflix special about how he’s been cancelled.
And that’s where I stopped. I’m a real working programmer who’s done tons of work in C++, so I know firsthand that it absolutely sucks compared to Rust. Go back to Typescript if you hate Rust so much.