TypeScript
-
OK, I'm sold. Sometimes it takes me a while to take on a new technology, especially when I don't want to buy into all the other stuff it gets entangled with. Such was the case with TypeScript, but I really didn't want to drink the Angular Kool-Aid, nor necessarily the ASP.NET / .NET Core Hawaiian Punch. But after figuring out how to get TypeScript to work in Visual Studio in a purely client-side development environment, and after using it now for a week to write a little homebrew application, I am definitely sold. So much less grief with stupid Javascript syntax errors, etc. Why didn't I do this sooner? ;)
Latest Articles:
Client-Side TypeScript without ASP.NET, Angular, etc.It is also one of the favourites on Slant, see overview here: best-languages-that-compile-to-javascript[^] :-\
-
If only we knew someone who'd written a book about it[^], eh @Pete-OHanlon? :)
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
I bought that book a few weeks ago. :thumbsup: https://www.amazon.com/Peter-OHanlon/e/B07VFXCBXJ%3Fref=dbs_a_mng_rwt_scns_share[^]
-
OK, I'm sold. Sometimes it takes me a while to take on a new technology, especially when I don't want to buy into all the other stuff it gets entangled with. Such was the case with TypeScript, but I really didn't want to drink the Angular Kool-Aid, nor necessarily the ASP.NET / .NET Core Hawaiian Punch. But after figuring out how to get TypeScript to work in Visual Studio in a purely client-side development environment, and after using it now for a week to write a little homebrew application, I am definitely sold. So much less grief with stupid Javascript syntax errors, etc. Why didn't I do this sooner? ;)
Latest Articles:
Client-Side TypeScript without ASP.NET, Angular, etc.I've never needed to use it so I haven't. What does it give you?
Social Media - A platform that makes it easier for the crazies to find each other. Everyone is born right handed. Only the strongest overcome it. Fight for left-handed rights and hand equality.
-
TypeScript is fantastic. I love it and I wish that C# had features like rest and spread (yes, these are JavaScript features, but as it's TypeScript we're talking about, I'm claiming that one for the home team).
Breaking the lounge rules here, a question about spread. Given something like:
Math.max(...aLargeArray)
and that I read that it does inplace replacement of the parameter list, did you ever look at what happens when the array has 10's of thousands of entries? I was about to use the spread operator on something and realized this might be a very bad idea, so opted forMath.max.apply(Math, aLargeArray)
Latest Articles:
Client-Side TypeScript without ASP.NET, Angular, etc. -
I've never needed to use it so I haven't. What does it give you?
Social Media - A platform that makes it easier for the crazies to find each other. Everyone is born right handed. Only the strongest overcome it. Fight for left-handed rights and hand equality.
ZurdoDev wrote:
What does it give you?
It's the difference between strongly typed vs. duck-typed. So you get real Intellisense and compile-time type checking, which when coupled with an IDE like Visual Studio (one option among many) you get to see the type errors before running the program. Some of the type definition syntax is more functional programming-like, so you can say "this type is of type A or B", which is neat. Given my general (and strong) distaste for duck-typed languages, TypeScript is a definite boon and significantly decreases the number of bonehead (and some not so bonehead) mistakes that I make programming in pure Javascript. My coding is also faster due to Intellisense, almost up to par with my efficiency with C#.
Latest Articles:
Client-Side TypeScript without ASP.NET, Angular, etc. -
ZurdoDev wrote:
What does it give you?
It's the difference between strongly typed vs. duck-typed. So you get real Intellisense and compile-time type checking, which when coupled with an IDE like Visual Studio (one option among many) you get to see the type errors before running the program. Some of the type definition syntax is more functional programming-like, so you can say "this type is of type A or B", which is neat. Given my general (and strong) distaste for duck-typed languages, TypeScript is a definite boon and significantly decreases the number of bonehead (and some not so bonehead) mistakes that I make programming in pure Javascript. My coding is also faster due to Intellisense, almost up to par with my efficiency with C#.
Latest Articles:
Client-Side TypeScript without ASP.NET, Angular, etc.Marc Clifton wrote:
It's the difference between strongly typed vs. duck-typed.
Ya, that's what I have always heard. I guess it's just never been a problem enough for me to care. Someday maybe.
Social Media - A platform that makes it easier for the crazies to find each other. Everyone is born right handed. Only the strongest overcome it. Fight for left-handed rights and hand equality.
-
Breaking the lounge rules here, a question about spread. Given something like:
Math.max(...aLargeArray)
and that I read that it does inplace replacement of the parameter list, did you ever look at what happens when the array has 10's of thousands of entries? I was about to use the spread operator on something and realized this might be a very bad idea, so opted forMath.max.apply(Math, aLargeArray)
Latest Articles:
Client-Side TypeScript without ASP.NET, Angular, etc.Yeah, that would be a bad use of it. I wouldn't use a spread operation in a scenario like this.
-
OK, I'm sold. Sometimes it takes me a while to take on a new technology, especially when I don't want to buy into all the other stuff it gets entangled with. Such was the case with TypeScript, but I really didn't want to drink the Angular Kool-Aid, nor necessarily the ASP.NET / .NET Core Hawaiian Punch. But after figuring out how to get TypeScript to work in Visual Studio in a purely client-side development environment, and after using it now for a week to write a little homebrew application, I am definitely sold. So much less grief with stupid Javascript syntax errors, etc. Why didn't I do this sooner? ;)
Latest Articles:
Client-Side TypeScript without ASP.NET, Angular, etc.Not getting new stuff when it's new isn't the worst of ideas. It's been true for HDMI/HDTV and it's very true in the web space. While we're at it, .NET 1.0 was a great concept but I'm glad I didn't get aboard back then in retrospective as well. Tech producers are too focused to produce an MVP quickly that they kinda forget the V in the process, going for quickly first. That said, I don't know how V TS was when it was first released. I am just stating general truths here.
-
OK, I'm sold. Sometimes it takes me a while to take on a new technology, especially when I don't want to buy into all the other stuff it gets entangled with. Such was the case with TypeScript, but I really didn't want to drink the Angular Kool-Aid, nor necessarily the ASP.NET / .NET Core Hawaiian Punch. But after figuring out how to get TypeScript to work in Visual Studio in a purely client-side development environment, and after using it now for a week to write a little homebrew application, I am definitely sold. So much less grief with stupid Javascript syntax errors, etc. Why didn't I do this sooner? ;)
Latest Articles:
Client-Side TypeScript without ASP.NET, Angular, etc.Welcome to the club
Marc Clifton wrote:
Why didn't I do this sooner? ;)
I would speculate that for the same reason that I didn't: Skepticism and too much hearsay.
To alcohol! The cause of, and solution to, all of life's problems - Homer Simpson ---- Our heads are round so our thoughts can change direction - Francis Picabia
-
OK, I'm sold. Sometimes it takes me a while to take on a new technology, especially when I don't want to buy into all the other stuff it gets entangled with. Such was the case with TypeScript, but I really didn't want to drink the Angular Kool-Aid, nor necessarily the ASP.NET / .NET Core Hawaiian Punch. But after figuring out how to get TypeScript to work in Visual Studio in a purely client-side development environment, and after using it now for a week to write a little homebrew application, I am definitely sold. So much less grief with stupid Javascript syntax errors, etc. Why didn't I do this sooner? ;)
Latest Articles:
Client-Side TypeScript without ASP.NET, Angular, etc.If you have waited this long, you might as well wait one more year then move entirely off of JavaScript with Blazor. Of course, TypeScript will probably cut out JavaScript, as well, and switch to compile directly to WebAssembly, so you will still be off of JavaScript either way.