Basically many modern and actually good features are in JS are C# things. Just think about the lambda arrow notation, which C# had far longer since it's version 3 around the year 2008. Not so strange since TS also comes from Microsoft and has a huge influence on actual JS too. It's on top of all the bad old legacy 90s design problems such as weird type coercions and other weirdnesses that JS also has though. But that's another subject too long for this comment section. Also important to note that most languages have similar solutions though. Java has try-with-resources and Python has a with statement. Other languages rely on actual RAII instead and do not even need extra keywords. Such as Rust.
@@sk_jay True, most people do not even know about C# or refer to it, and often they mention JS. However, I am not sure if the TPL is also older than JS Promises, which are both the unlying concurrency libraries. Dotnet Framework 4 introduced TPL, and 4.5 introduced the actual async await syntax later. If I am right Node JS already came with the first implementation of Promises around 2009. Not that we can fully compare them, as JS is single threaded, but you get the idea.
Hey Matt, you're my favorite RUclipsr when it comes to programming in general. Always straight to the point, with VERY useful tips. Every post/video of yours is worth our time!
I'm using the jest runner vscode extension, and it doesn't recognize the `using` keyword. When I introduce the keyword to my test file, the "run test" hints above each test definition disappear. Any thoughts on this?
C# users are extremely familiar with 'using' and it is darn nice to finally have it in JS.
Basically many modern and actually good features are in JS are C# things. Just think about the lambda arrow notation, which C# had far longer since it's version 3 around the year 2008.
Not so strange since TS also comes from Microsoft and has a huge influence on actual JS too.
It's on top of all the bad old legacy 90s design problems such as weird type coercions and other weirdnesses that JS also has though. But that's another subject too long for this comment section.
Also important to note that most languages have similar solutions though. Java has try-with-resources and Python has a with statement.
Other languages rely on actual RAII instead and do not even need extra keywords. Such as Rust.
Aync ,Await has been in c# before js implemented it...
@@sk_jay True, most people do not even know about C# or refer to it, and often they mention JS.
However, I am not sure if the TPL is also older than JS Promises, which are both the unlying concurrency libraries.
Dotnet Framework 4 introduced TPL, and 4.5 introduced the actual async await syntax later.
If I am right Node JS already came with the first implementation of Promises around 2009.
Not that we can fully compare them, as JS is single threaded, but you get the idea.
Matt is just awesome! I Love everything he does for us.
Hey Matt, you're my favorite RUclipsr when it comes to programming in general. Always straight to the point, with VERY useful tips.
Every post/video of yours is worth our time!
The beanie looks good on you matt
This seems pretty fancy
Cool
I love this tip. But this video is way too meta.
using hat = changeThingsUp()
I would expect then the hat to be disposed at the end of the video.
@@DefekacjaOdbytayou spitting fire 😂😂
Amazing.
Now wait till it actually works in JS.
Foo fancy and non-obvious for my liking
I'm using the jest runner vscode extension, and it doesn't recognize the `using` keyword. When I introduce the keyword to my test file, the "run test" hints above each test definition disappear. Any thoughts on this?
File an issue, they'll need to update the extension
What is the advantage of just using beforeEach or AfterEach
It makes the tests less portable and harder to read.
That is the wrong type of hat.. It's meant to be a Top Hat..
(Still waiting for your head size)
Please give a real example
www.totaltypescript.com/typescript-5-2-new-keyword-using
It's not even on mdn