They nearly gave JavaScript types

  Рет қаралды 27,703

Matt Pocock

Matt Pocock

Күн бұрын

Пікірлер: 166
@omri9325
@omri9325 Жыл бұрын
Discovering ES4 is like discovering an ancient civilization had electricity and smart phones 2000 years ago.
@nazar1744
@nazar1744 Жыл бұрын
Yeah, feels like everything we have today was introduced almost 24 years ago.
@mhmdalharbi2370
@mhmdalharbi2370 Жыл бұрын
I was shocked when saw ESX
@smthngsmthngsmthngdarkside
@smthngsmthngsmthngdarkside Жыл бұрын
Oh then Let me tell you about the precision of cutting granite, one of THE hardest known materials on the planet. Today, we struggle with our diamond tipped tungsten carbide, laser cut hardened steel saws. But Yolo, the people before the Egyptians... No problems. Making ice-cream scoop like impressions in granite... No sweat. Us today? Naww. How you even?
@minikame2272
@minikame2272 Жыл бұрын
Reminds me of that black and white photo of a woman on a mobile phone. People were meme-ing about her being a time traveller, but it turns out she was legitimately just using a prototype mobile phone decades before they were viable for general use. Feels weird knowing what was under our noses the entire time.
@Riexn
@Riexn Жыл бұрын
It's really impressive how ES4 was going to be ahead of its time
@soniablanche5672
@soniablanche5672 Жыл бұрын
What's funny is that PHP ended up having almost all these features, but not javascript.
@TehRoflizer
@TehRoflizer Жыл бұрын
Seems very inspired by Java
@Hamstertron
@Hamstertron Жыл бұрын
@@TehRoflizer Everything copies Java in the end
@illker.
@illker. Жыл бұрын
@@Hamstertron They didn’t
@Hamstertron
@Hamstertron Жыл бұрын
@@illker. Bro it's ok, nothing to be ashamed of. PHP did it too.
@JedRichards
@JedRichards Жыл бұрын
ActionScript 3 was a pretty faithful, if not 100% perfect implementation of ES4. ActionScript powered huge amounts of the multimedia web until Flash was killed off in the early 2010s. As an ex-Flash dev its kinda funny/sad/awesome how we've come back full circle to so many of these language features with TS - I mean, I'm glad we finally have but it was pretty rough to be making way without them for a fair few years.
@wayslow
@wayslow Жыл бұрын
AS3.0 was great, but the tooling was awful. Writing scripts in Flash IDE was horrible, Flex IDE left a lot to be desired and FDT - I couldn't find a crack for ;) Kids these days have it too easy with their free VSCodes, hot reloads and frameworks for everything. Something something uphill both ways!
@biskitpagla
@biskitpagla Жыл бұрын
thanks for making my chidhood you guys. really miss those glorious flash days
@JedRichards
@JedRichards Жыл бұрын
@@wayslow Ehh, in the final dark few years we had Flash Builder, which was based on the Eclipse IDE platform. That thing was pretty neat. Proper step debugging, perfect intellisense, static analysis, type checking, lots of nice things we only really got back with by the time VS Code got underway.
@edgeeffect
@edgeeffect Жыл бұрын
That explains a lot, I once said to a Flash developer "oh ActionScript is just the same as JS" and he went all "incredible hulk" on me... I see why now. But, then again, in those days, I still thought jQuery was ah-mazing...............
@famnyblom6321
@famnyblom6321 Жыл бұрын
I really enjoyed AS3 as well. So sad that it never caught on outside Flash.
@Karpour
@Karpour Жыл бұрын
We could have had integers in JS 24 years ago? Infuriating :P
@DanielDogeanu
@DanielDogeanu Жыл бұрын
Damn, it even had the `private` keyword, instead of the botched implementation that they did now with # in front.
@anatolydyatlov963
@anatolydyatlov963 Жыл бұрын
Damn, they were so close to making this language so much better, and yet something stopped them
@rulesprog
@rulesprog Жыл бұрын
I really really wonder what &^%^$# ((
@biskitpagla
@biskitpagla Жыл бұрын
that something was literally microsoft lmao
@rulesprog
@rulesprog Жыл бұрын
@@biskitpagla f@#$g microsoft "made typescript" but killed built-in ts?! ((
@sqlexp
@sqlexp Жыл бұрын
Nah. We all know that scriptards hate static typing; just look at every other scripting language. If anything, my bet is that Microsoft was the main one trying to add static typing to JavaScript, but the other scriptards sabotaged it.
@SimonBuchanNz
@SimonBuchanNz Жыл бұрын
It was Adobe pushing their AS3 language they just bought as the next standard (so they could... license flash technology to browsers or something? Unclear) My impression was that nobody else on the committee liked the specific design, and couldn't get Adobe to budge, but it's been a long time since I've read about it.
Жыл бұрын
Omg - why have they never shipped, the world would be a better place. Any I'm so happy that we finally realise that types are awesome. Still filling a bit sad not to have type checking during runtime.
@TheDuckPox
@TheDuckPox Жыл бұрын
There is zod now.
@DemPilafian
@DemPilafian Жыл бұрын
The ES4 notation mostly already existed in Java Servlets, and Java Servlets didn't make the world better. (Of course, Java in the browser had a ton of problems, so maybe that's an unfair comparison.)
@steamedeggeggegg
@steamedeggeggegg Жыл бұрын
ES4 almost made JavaScript Java script
@tarwin
@tarwin Жыл бұрын
I seem to remember Adobe had something to do with this too and ended up kind of melding it into ActionScript3 ? And there was a hope that this would then become ES4 again ? I gave up waiting and ended up using Haxe to output to ES3 😞
@mattpocockuk
@mattpocockuk Жыл бұрын
Yes! Macromedia was involved (though I think not on the committee) and based A3 on the ES4 spec. But when ES4 collapsed they were hung out to dry a bit.
@jakob7116
@jakob7116 Жыл бұрын
Wow those overloads were actually super cool
@AndrewErwin73
@AndrewErwin73 Жыл бұрын
Correction: promises were introduced in ES6, but async/await wasn't introduced until ES7!
@kevin.malone
@kevin.malone Жыл бұрын
Yeah promises without async/await was one of my least favorite things about js in that time period. It essentially forced you to structure you code with endless callbacks
@JeyPeyy
@JeyPeyy Жыл бұрын
As a former haskeller, (number, string) looks like it's a tuple. I'm happy we got unions with | instead
@hugodsa89
@hugodsa89 Жыл бұрын
I literally checked if it was April fools today
@Iammrunkown
@Iammrunkown Жыл бұрын
I wish Javascript had these features today!
@blazinghellwheels
@blazinghellwheels Жыл бұрын
I work with E4X in Mirth with Rhino currently. It doesn't have all the features and XML work is pretty jank to work with But it definitely beats es3 and XSLT
@TahirDibirovII-bb3br
@TahirDibirovII-bb3br Жыл бұрын
We need it back!
@SimonBuchanNz
@SimonBuchanNz Жыл бұрын
As someone who heavily used both Javascript 3 and actionscript 3 for (desktop!) application development, I'm not at all surprised that AS3 was dropped when it was proposed as ES4. As3 might have been handy for flash games, but for serious application and library development it was a complete mess, absolutely nothing like as nice as typescript. There's more in ES4 than AS3, but not by much and it's not clear that much if any effort was put into thinking about if all these features were at all feasible, let alone together (like, how did the overloading work with union types?) Basically, it's easy for a language to look cool in syntax examples, extremely hard for it to actually be a good language. The ECMA committee have done incredible work turning the mess that es3 was in around, and it's gone from near the bottom of my list to near the top, and I've got quite a long list of languages.
@KirtFitzpatrick
@KirtFitzpatrick Жыл бұрын
Bump. After watching this video I'm glad ES4 got shot down. Strongly typed languages were a huge pain in the butt for decades. We needed to go through this untyped/duck typing phase to collectively understand that we deserve more from our typing systems. For about the first decade of my career I only used strongly typed languages and there is no comparison between the state of those typing systems and the near utopian TypeScript experience we have now.
@gegedu75
@gegedu75 Жыл бұрын
So we lost 25 years in terms of technological progress. Huge bummer! And to this day we still don't have a type system included natively in the browser. Imagine all the unnecessary suffering inflicted upon programmers all those years. Untold amount of hours lost in productivity. And billions upon billions of $ that did not materialize because of it. People who shut down ES4 should be put on trial.
@mattpocockuk
@mattpocockuk Жыл бұрын
I don't think it was 'shut down' - I think it was: 1. Various companies couldn't agree which features they wanted to implement 2. The web was more 'walled gardens' then (Netscape, IE) so shipping a new general version of the language didn't feel like a priority 3. Browsers balked at needing to support these new proposals So I don't think a radical shift would even have been possible back then.
@raph151515
@raph151515 Жыл бұрын
@@mattpocockuk yes it was shut down or killed, because it didn't continue and in fact it's the exact period where nothing happened for years in the JS progress, the browser env was harder to change than flash because it was edited by a single company and was simpler and had versionning. maybe when they realized that flash will get it first they chose to kill it to avoid competition.
@aleksander5298
@aleksander5298 Жыл бұрын
ES6 did not introduce async/await, it was introduced in ES8
@_the_one_1
@_the_one_1 Жыл бұрын
plot twist: Those who were involved in ES4 got together and worked on TypeScript :D
@pupfriend
@pupfriend Жыл бұрын
Maybe one day we could have something akin to a 'use strict' that would enforce runtime type checking?
@bonedfps
@bonedfps Жыл бұрын
Adding file directives to enforce a certain (*possible breaking) runtime behaviour isn't that great of an idea imo, it is kind of inconsistent. If you accidentally leave it out once it will be a complete nightmare and would lead to possible fatal silent errors. What would be great tho is something like tsconfig for Javascript, where you can toggle runtime checks for an entire program (including it's dependencies - of course) 🥹
@sck3570
@sck3570 Жыл бұрын
we can only hope
@SimonBuchanNz
@SimonBuchanNz Жыл бұрын
More modes have been explicitly rejected by the committee in general, and they're quite aligned on not adding a runtime checked type system (both for several very well founded technical reasons). It's been tried, several times, even, and the consensus from people that would know is it's technically a bad idea too, as it both significantly slows startup time to perform all the checks, and doesn't improve runtime performance better than, or even as much as, dynamically inferred runtime types. So, while it's not completely impossible, you should expect it not to happen.
@pupfriend
@pupfriend Жыл бұрын
@@SimonBuchanNz You get the awards for best buzz kill and best profile image... There wolf... there castle.
@jacklambert7809
@jacklambert7809 Жыл бұрын
JavaScript *has* runtime type checking. It is one of the key advantages of a compiler that it checks the code BEFORE you run it.
@SamuelPiirainen
@SamuelPiirainen Жыл бұрын
These are features found in most "good" programming languages so hilarious this was never implemented and instead was sort of patched years later with TS
@willkuerlich
@willkuerlich Жыл бұрын
Can we have a time machine please?
@Loige
@Loige Жыл бұрын
Loved this episode... a trip down memory lane! Thanks, Matt! You made me remember another awesome anecdote that might complement this story. Who actually implemented ES4? ActionScript 3, the language that powered the more recent versions of Flash (as long as it survived). I actually liked a lot ActionScript 3 as a language (even though it felt very Java-ish!). And what about E4X? Adobe Flex implemented that and I think it was a great idea at the time (not too different from what component-based frameworks using JSX are today). Such a shame all this work got lost once the flash platform died out... But on the other end is great to have the web is powered by an open platform rather than a proprietary runtime :P
@alexandru-gabrielmanea4495
@alexandru-gabrielmanea4495 Жыл бұрын
Can you please do a tutorial on how to properly use zod-fetch? :D
@mattpocockuk
@mattpocockuk Жыл бұрын
Sure! What issues are you running into?
@aghileslounis
@aghileslounis Жыл бұрын
They were so smart back in the days...I feel like now everything stopped or slowed down really hard, like people are afraid to innovate, like WHY JS is not evolving at a greater speed 😞
@raph151515
@raph151515 Жыл бұрын
you are wrong on one detail : it was shipped as Action Script 3, I used it for almost a decade, I had to find a lot of patience when working with javascript at the time, and I switched only 4 years ago when some of the mandatory stuff began being supported widely in runtime environments. During the same time javascript progress slowed to a crawl . The ES4 is more than just jsx, it comes with special syntax and an API, you can use it to parse and match fragments of XML/HTML. It made using XML nice and powerful, better than JSON which come with no API/feature (apart from parsing, serializing) from syntax and it allows to use the same skills and knowledge to work on the document and the configuration/data files. The package looks a big redundant but makes sense, it's a subjective choice really, there was no "default" but I don't consider this critical. Most of what it brings would have turbo charged the community, and there would have been ways of handling retro compatibility. This fuck up was the reason why I stayed far away from JS for most of my career. Now with TS I'm back in 2004 when I was using AS2 which is really not as good as AS3, so I still consider JS not as advanced as AS3 was. AS3 is only missing some recent syntactic sugar and the async/await promise, it would be quicker to go from there and apply the recent upgrades. Some TS advanced typing feature makes powerful things possible, which were not in AS3, sometimes the usable patterns were limited by the language features. Today to make a good HTML component framework possible using ES4 and E4X powers, it would require many recent JS improvements to make it practical, but the potential was clearly there.
@victorlongon
@victorlongon Жыл бұрын
A bit of topic but do you have any video discussing in what scenario you actually use function overload? I feel that almost always genetics do the job in a more elegant way.
@jacklambert7809
@jacklambert7809 Жыл бұрын
Polymorphism. An overloaded function/method can implement entirely different behavior depending on the passed arguments.
@ransomecode
@ransomecode Жыл бұрын
I got goosebumps and at the same time tears in my eyes by seeing this!
@sevdalink6676
@sevdalink6676 Жыл бұрын
Javascript almost got Java :D The JS community is sometimes very funny, they make a hype, and when you look at it, it is just something that exists in C or Java for 10, 20 years. I think it is all more about young programmers learning JS as their first language without knowing the whole programming languages ecosystem.
@redcrafterlppa303
@redcrafterlppa303 Жыл бұрын
I thankfully started with Java sucked up every bit of syntax and structure and departured to rust to embrace a huge amount of new syntax and structure. Every time I write or even see Javascript I feel sad for the devs working with it.
@brangtoggez6363
@brangtoggez6363 Жыл бұрын
Well even if it exists in C or Java, It is still a bomb in javascript. Because javascript can do things easier than C or Java, meaning with more power relative to C, javascript will be a lot better => Hype. I think people hype up has a point though, more power means more responsibility, but with javascript your responsibility is much smaller than C or java.
@DemPilafian
@DemPilafian Жыл бұрын
In an alternate universe JavaScript takes it's name from Java because it's basically the same thing.
@cas818028
@cas818028 Жыл бұрын
So now we just need to resurrect this proposal and no more TS. Love it!
@ColinRichardson
@ColinRichardson Жыл бұрын
Reminds me of when they went to ActionScript 2 and further onto ActionScript 3.. I bet they were loving what was happening there, and then bailed halfway through
@mattpocockuk
@mattpocockuk Жыл бұрын
Yeah, ActionScript 3 was based on the spec that was put together for ES4 - so when ES4 failed it left ActionScript 3 out to dry.
@ColinRichardson
@ColinRichardson Жыл бұрын
@@mattpocockuk I remember those days.... Though, I also remembering trying to use XML back in AS3.. and almost crying..
@wayslow
@wayslow Жыл бұрын
@@mattpocockuk as old AS3.0 dev - I was super pleasantly surprised how much at home I felt when I did my first big TS project... and how disappointed I became when I realized it's not runtime. Anyway - It's a nice idea for a video to compare AS3 to TS.
@ColinRichardson
@ColinRichardson Жыл бұрын
@@wayslow you mean you didn't have the pleasure of using AS2 with someObj._y = 123; because underscores meant the property was extended... Because... People cared??? It was horrible.
@raph151515
@raph151515 Жыл бұрын
@@ColinRichardson AS2 was a step in the typing direction but was not very well designed and it was limited like TS is because it compiles down to un-typed AS1.
@SergiySev
@SergiySev Жыл бұрын
ActionScript 3.0 smell in the AIR 😁
@turolretar
@turolretar Жыл бұрын
I think in about 20 years we will def have this
@raph151515
@raph151515 Жыл бұрын
😆
@richardantao3249
@richardantao3249 Жыл бұрын
async await came out in ES7
@mattpocockuk
@mattpocockuk Жыл бұрын
My bad! Thought it was ES6.
@richardantao3249
@richardantao3249 Жыл бұрын
@@mattpocockuk all good! Great content Wizard
@RubenMiquelino
@RubenMiquelino Жыл бұрын
Why didn't it ship tough? Maybe jit engines would become slow?
@jalal-ud-dinal-tabri2054
@jalal-ud-dinal-tabri2054 Жыл бұрын
Why didn't they release ES4?
@biskitpagla
@biskitpagla Жыл бұрын
js wasnt considered worth investing in back in those days so tons of big names rallied against the advancements.
@codedusting
@codedusting Жыл бұрын
None of this surprising as static languages existed since 75 and proven to be far better than dynamic languages when building big projects spanning across members.
@Stoney_Eagle
@Stoney_Eagle Жыл бұрын
We could have all this good stuff back then, what a shame 🥺
@barneylaurance1865
@barneylaurance1865 Жыл бұрын
Wow that runtime type checking looks a lot like PHP.
@barneylaurance1865
@barneylaurance1865 Жыл бұрын
And the ES4 never being released is sort of reminiscent of PHP 6. I think that was supposed to replace the built in strings with Unicode strings, but it was never shipped. Replaced I think with 5.6 and then 7.
@ColinRichardson
@ColinRichardson Жыл бұрын
1:56 Colin approves of the length of that Generic
@rod6722
@rod6722 Жыл бұрын
Oh boy, what the Internet could've been!
@lord12790
@lord12790 Жыл бұрын
In some universe of these multiverses (if theory is true), this proposal might have been accepted and there is no typescript
@aaaaanh
@aaaaanh Жыл бұрын
We could have had flying cars and time machines if ES4 had been the standard. Instead we’re here writing typescript, treated as outcasts by the javascript plebs
@nazaka9904
@nazaka9904 Жыл бұрын
Why hasn't this version of js been approved?
@nathanalberg
@nathanalberg Жыл бұрын
if i have a ts question i want to fire at you.. how would i do that?
@mattpocockuk
@mattpocockuk Жыл бұрын
mattpocock.com/faqs
@kilo.ironblossom
@kilo.ironblossom Жыл бұрын
Looking at ES4 gives me the feel that it was just a wannabe JAVA, got dismissed cause there was already JAVA.
@richardhenrysutterrosendo3439
@richardhenrysutterrosendo3439 Жыл бұрын
Did I read "Tail call"? Really, they were really into bringing TCO to JS? What a missed opportunity. And proper numeric types.
@belkamax05
@belkamax05 9 ай бұрын
Glad it never happend. I like how typescript is now only a superset of JS and not a standart. I know new developers struggle on this chaos, but in real examples this choise is giving more flexibility to where do level down.
@Iammrunkown
@Iammrunkown Жыл бұрын
This is crazy!
Жыл бұрын
Weirdly enough Microsoft (the creator of Typescript) would oppose ES4.
@enfieldli9296
@enfieldli9296 Жыл бұрын
I love this
@austincodes
@austincodes Жыл бұрын
JavaScript just needs to adopt type script features and do them in runtime. It would make JavaScript so much better
@helmedfox9559
@helmedfox9559 Жыл бұрын
This video was pretty informative and ...cozy?
@porroapp
@porroapp Жыл бұрын
💚💚💚
@DemPilafian
@DemPilafian Жыл бұрын
Not really sure if ES4 qualifies as *"forward thinking."* Many of those features look almost identical to OO features in other languages right at the time that OO was peaking in mindshare and popularity. ES4 looks like an attempt to turn JavaScript into Java.
@edgeeffect
@edgeeffect Жыл бұрын
Not just types but `int` and `double` as separate from `number`!!!!!!!
@Dev-Siri
@Dev-Siri Жыл бұрын
Ignoring the type system, a considerable number of features from ES4 were added to ES6 but with a different syntax. Eg, the `private` keyword is replaced by private members (properties or methods starting with '#') Classes (And methods) are defined in a shorter way that in ES4, ES Modules (Which IMO is better than the ones in ES4, it kinda resembles Java's API) Getters and setters defined with their respective keywords which are also much shorter, And ESX with JSX. (Although its not the same as having native support in the language) IMO, the newer API's introduced in ES6 and beyond are better. But the reason ES4 is so missed is because of its Type system. There is currently a proposal for Types as comments in JavaScript, but since the JS engine will just ignore it like a comment, it won't be as good as the ES4 that actually used it..
@maelstrom-qw1jl
@maelstrom-qw1jl Жыл бұрын
Types in comments has been around for a long time. It's called JSDoc.
@Dev-Siri
@Dev-Siri Жыл бұрын
​@@maelstrom-qw1jl I'm not talking about JSDoc annotations. The 'types as comments' proposal aims to bring typescript-like annotations to javascript natively. Like in JSDoc, you would do something like: /** @type {number} */ let x; But the proposal aims to add typescript-like annotations, like: let x: number; You can search for it, it's in stage 2 I think.
@maelstrom-qw1jl
@maelstrom-qw1jl Жыл бұрын
@@Dev-Siri Oh OK I got confused by the name. Treating type annotations as inline comments. Strange choice of words by TC39.
@mzerone-g6m
@mzerone-g6m Жыл бұрын
ES4 Become more java i love to see this overload and runtime checkers
@bloodandbonezzz
@bloodandbonezzz Жыл бұрын
Such a shame ES4 was never a thing.
@xBZZZZyt
@xBZZZZyt Жыл бұрын
javascript now has types (typeof exists)
@mme725
@mme725 Жыл бұрын
ES4 walked so PHP 6 could run. (Just in the "version lost to time and skipped" sense)
@soniablanche5672
@soniablanche5672 Жыл бұрын
I read somewhere that the first version of Javascript didn't even support multi dimensional arrays lol
@SimonBuchanNz
@SimonBuchanNz Жыл бұрын
It still doesn't? Arrays of arrays, aka "jagged arrays" as each item array can be of different length, are quite different.
@shinebayar
@shinebayar Жыл бұрын
It probably happened in an alternate universe where JS doesn't suck.
@roccociccone597
@roccociccone597 3 ай бұрын
I mean this would've made JS into Java... Well anything would've been better than what JS is now. It might have even become a decent server-side language. Oh well we got Go for that so we're good.
@BernardoMenescal
@BernardoMenescal Жыл бұрын
it was cool and all until E4X caught me completely off guard
@koleosooyindamola860
@koleosooyindamola860 Жыл бұрын
basically, Microsoft stole features of es4 for Typescript
@bigmistqke
@bigmistqke Жыл бұрын
Makes me a bit sad
@haliszekeriyaozkok4851
@haliszekeriyaozkok4851 Жыл бұрын
The guys whom made typescript definitely got most of the clues from es4.
@TheWordBecameFleshJ114
@TheWordBecameFleshJ114 Жыл бұрын
This is where Microsoft inspired when they created Typescript.
@nurmohammed9642
@nurmohammed9642 Жыл бұрын
Do we wizards just code ? what about our witches ?
@SomoeBlog
@SomoeBlog Жыл бұрын
as good as it sounds, it will only kill javascript if it did. The next non-typed "easy to learn" script lang will take over just like js did, you all will be writing type-vb-script today, prob also made by MS
@Ausind-z4s
@Ausind-z4s Жыл бұрын
Wait.. It was more like Java.
@RedStone576
@RedStone576 Жыл бұрын
legit just bootleg java, oh wait
@HosamSultan
@HosamSultan Жыл бұрын
Let's see how much of conspiracy this video will generate
@Gaijin101
@Gaijin101 Жыл бұрын
If only ES4 survived, we could be rid of this language for a language
@scarlatum
@scarlatum Жыл бұрын
In some moment for JS it was so unbearable to be a toy language, then it start mutate into C++
@turolretar
@turolretar Жыл бұрын
@@maelstrom57 it’s just not fashionable anymore. Other than that it’s a fine language, why not use it
@scarlatum
@scarlatum Жыл бұрын
​@@maelstrom57 Not sure about how it goin in other countries, i can say only for Russia - A lot vacancy in embedded development & IoT. Only issue is pretty high knowledge requirement and long term experience ( About 3-5 years )
@jacklambert7809
@jacklambert7809 Жыл бұрын
@@maelstrom57 The shit people write on the internet...
@injSrc
@injSrc Жыл бұрын
Who ever is Wondering why this version of JavaScript was not released because If they had released this one, it could have broken 99% of the existing websites.
@maelstrom-qw1jl
@maelstrom-qw1jl Жыл бұрын
That's not the reason.
@redcrafterlppa303
@redcrafterlppa303 Жыл бұрын
If ES4 happened I would probably be a web developer instead of a systems developer. I like strict type systems that make things crystal clear. I think dynamic typing is and has always been a big mistake and should have never been created.
@rnater7145
@rnater7145 Жыл бұрын
Hmm, hope by going back in time you didn't interfere with the time-line - you might have just inadvertently caused billions of errors never to be born
@sushilbalami
@sushilbalami Жыл бұрын
First
@mahadevovnl
@mahadevovnl Жыл бұрын
Unpopular opinion: JS was fine without TypeScript. Types are unnecessary if you use proper naming conventions and sensible software design.
@turolretar
@turolretar Жыл бұрын
Js was fine up until node and then other frameworks rolled around
@SimonBuchanNz
@SimonBuchanNz Жыл бұрын
I think it's a minority position, but I wouldn't say unpopular. Personally, I think it largely depends on the size of the project, the quality and complexity of the untyped language, the quality and complexity of the type system, and your knowledge of how to handle issues with either not using or using a type system. I think a lot of the push back against type systems from the 90s-00s was due to the majority of available type systems being clumsy and not very valuable and the by then more feasible untyped languages becoming much more powerful, but by now we have quite good type systems, and it's definitely worth getting familiar with them if the other factors (size of project, etc) line up.
@mahadevovnl
@mahadevovnl Жыл бұрын
@@SimonBuchanNz I'm a tech lead for a large company at the moment, and I have to outline future developments, strategies, architecture, etc. I'll always choose TypeScript for situations like the one I am in. But you're right, it's not all black and white; some people and some projects and some teams are perfectly fine without TypeScript. I'm one of those people, I started as a front-end developer in 2000 and I've done vanilla JavaScript far longer than TypeScript has even been around. I learned it "the right way", but I also see that people who have "only" been around for, say, 5 to 8 years (many people!) have probably never worked with just vanilla JavaScript. For them, it's almost impossible to work without TS. And I acknowledge that fully. It just came as a surprise to me that when I worked for one of the bigger FAANG companies, my entire team decided against using TypeScript for 5 of our projects. Significant projects, mind you, but the average age of the people was above 35. Most of us were autodidact, too. So most of us simply didn't need TS. I'l admit that I didn't like TS up until 3 years ago, though. Before that (before 2019 I would say) it was not intuitive at all, too many things were missing, too many gotchas... Today, TS is fine. And I hope they realize they need to not make it unfine. When TypeScript turns into Java, I'll stop being a hands-on manager and I'll just develop for fun in my own time.
@rand0mtv660
@rand0mtv660 Жыл бұрын
It was fine if you are a solo developer on a smaller project. With growing project complexity and having more people on the project, TypeScript is just a super powerful tool. You also cannot always count that you will have mid-senior people working on a project. You know, juniors exist as well and they are a majority of the market probably. Yes TS has a learning curve and it can annoy you from time to time, but all of its downsides are worth it when you realize what you get out of it. I've been using TypeScript for 3-4 years now and going back to a JS project these days feels awful. I'm not even coming from a strongly typed background either since JS was the first language I learned so I don't have bias towards typed languages, but TS feels great to use, especially in a team. If you have great success just writing vanilla JavaScript, then go for it, but I think as time goes on you'll be left behind. If you are against TS just for some personal reasons (Microsoft bad or something), you should re-evaluate your position and actually try TypeScript in a real project. Who knows, you might like it.
@mahadevovnl
@mahadevovnl Жыл бұрын
​@@rand0mtv660 Read my other reply :) I do like TS, but I don't need it. For me, TS adds nothing of value. It feels like constantly walking on the streets and pointing at things and saying what it is. "That's a car! That's a bird! That is air! That is a street! That is a building! That is glass! That is a bus!" And then generics come into play and suddenly: "That B is sometimes a C but it can also serve as a T!" People might wonder what these single-lettered things are, and they are super confused. But the TypeScript lover throws them around everywhere. I've worked with TS nearly full-time for 7 years now, over a 22+ year long career, including several FAANG companies. And I get why many people love it and need it. But for me, myself, and I? It's overly verbose and strictly unnecessary all of the time. Coding and naming conventions plus progressively applied JSDoc offered all I need and I never needed more. But I would also never start a project without TS anymore. Because I need to keep learning new TS things every release :) And I need to stay relevant in the market.
Dan Abramov asked me to help fix React
3:53
Matt Pocock
Рет қаралды 33 М.
Infer is easier than you think
13:38
Matt Pocock
Рет қаралды 96 М.
Don’t Choose The Wrong Box 😱
00:41
Topper Guild
Рет қаралды 62 МЛН
To Brawl AND BEYOND!
00:51
Brawl Stars
Рет қаралды 17 МЛН
coco在求救? #小丑 #天使 #shorts
00:29
好人小丑
Рет қаралды 120 МЛН
Enums considered harmful
9:23
Matt Pocock
Рет қаралды 218 М.
The TSConfig Cheat Sheet
5:36
Matt Pocock
Рет қаралды 40 М.
Ranking Java Features Added from Versions 8 to 21!
27:03
Tales from the jar side
Рет қаралды 19 М.
TypeScript 5.4 - NoInfer, groupBy и улучшения
9:43
PurpleSchool | Anton Larichev
Рет қаралды 6 М.
Factorio teaches you software engineering, seriously.
21:27
Tony Zhu
Рет қаралды 2 МЛН
Don't put your types in .d.ts files
3:54
Matt Pocock
Рет қаралды 145 М.
How Did I Not Know This TypeScript Trick Earlier??!
9:11
Josh tried coding
Рет қаралды 220 М.
When Optimisations Work, But for the Wrong Reasons
22:19
SimonDev
Рет қаралды 1,2 МЛН
any vs unknown vs never: TypeScript demystified
8:01
Andrew Burgess
Рет қаралды 26 М.
The empty object is TypeScript's weirdest type
5:00
Matt Pocock
Рет қаралды 27 М.
Don’t Choose The Wrong Box 😱
00:41
Topper Guild
Рет қаралды 62 МЛН