Тёмный

JavaScript: The Good Parts 

Google TechTalks
Подписаться 347 тыс.
Просмотров 585 тыс.
50% 1

Google Tech Talks
Web Exponents
presented by Doug Crockford
February 27, 2009
blog post: google-code-upd...
JavaScript is a language with more than its share of bad parts. It went from non-existence to global adoption in an alarmingly short period of time. It never had an interval in the lab when it could be tried out and polished. JavaScript has some extraordinarily good parts. In JavaScript there is a beautiful, highly expressive language that is buried under a steaming pile of good intentions and blunders. The best nature of JavaScript was so effectively hidden that for many years the prevailing opinion of JavaScript was that it was an unsightly, incompetent abomination. This session will expose the goodness in JavaScript, an outstanding dynamic programming language. Within the language is an elegant subset that is vastly superior to the language as a whole, being more reliable, readable and maintainable.
Speaker: Douglas Crockford
Douglas Crockford is a product of our public education system. A registered voter, he owns his own car. He has developed office automation systems. He did research in games and music at Atari. He was Director of Technology at Lucasfilm. He was Director of New Media at Paramount. He was the founder and CEO of Electric Communities/Communities.com. He was founder and CTO of State Software, where he discovered JSON. He is interested in Blissymbolics, a graphical, symbolic language. He is developing a secure programming language. He is now an architect at Yahoo! and the world's foremost living authority on JavaScript.

Опубликовано:

 

27 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 262   
@vilimomo6114
@vilimomo6114 10 лет назад
Its been 5yrs since this video was released!, im learning to code and teaching myself and im so happy that people like Douglas Crockford are guiding people in the right direction when coding with best practices.
@horacinis
@horacinis 4 года назад
It's now been 11 years since this video was released!
@pas0003
@pas0003 Год назад
@@horacinis 14 years and counting!
@svperuzer
@svperuzer Год назад
How's the coding going?
@hhlohmann3881
@hhlohmann3881 5 лет назад
Still after years, best of and on JS is Douglas Crockford
@janbytemare
@janbytemare 2 года назад
Even after so many years, most of these are still relevant!
@zhujy8833
@zhujy8833 12 лет назад
No. He is right. The outerfunction is being executed immediately or self-executed. So we do not need to use digit_name()(3). Instead, we us digit_name(3) directly. Actually, the outer function can be considered as a model that is able to be used in other place of the application
@TerresEndormies
@TerresEndormies 11 лет назад
Minute 15 and you already put names to the things that completely baffle/infuritate me about my first run in with Javascript (Geogebra). And the GOOD. Loose typing. Finally. Yes, I want to operate on that. Just, let me say what I mean. The first time I tried to *broop* pass an object that I KNEW could be operated on if only.... and it PASSED... I was so happy I had to stand up and walk around. Finally. I hate being a prisoner of another person's mind. Hahaha transitivity table. Thank you.
@SudeeptoDutta
@SudeeptoDutta 10 лет назад
Great presentation by Doug . He was clear about what he wanted to say, honest enough to accept that JS has some unnecessary *bad parts* in it and sometimes *bold* enough to defend JS from inaccurate and impartial accusation of it being a bad language. This is the first RU-vid video that I watched on one sitting . :D
@danieljoonlee
@danieljoonlee 8 лет назад
The beginning was great. One of the largest languages where people don't try to understand before using it. That's hilarious, and I definitely fell into that category. Great video Mr. Crockford.
@johnstilley5063
@johnstilley5063 11 лет назад
His constructor pattern at 28:19 blew my mind a little. Crap, I need to go refactor all the JavaScipt I've ever written.
@wladwlad
@wladwlad 11 лет назад
"When a compiler gets an error it backs up, looks for a line feed, inserts a semicolon and tries again." jesus christ... there's a special level of hell for people with ideas like this...
@josephfaulkner9047
@josephfaulkner9047 5 лет назад
;
@nathanjames19
@nathanjames19 8 лет назад
Crockford says that Scheme has "loose typing." This is incorrect. Scheme is a _dynamically_-typed language. It is also a *strongly*-typed language. JavaScript is dynamically-typed, but it's also *weakly*-typed. This is what I would describe as "loose typing" and this is one of the main things that cause a lot of problems with the language: medium.com/javascript-non-grata/javascript-is-a-dysfunctional-programming-language-a1f4866e186f. Dynamic typing is actually quite nice and powerful. Languages like Scheme and Smalltalk are great for this reason. But JavaScript's loose typing and freewheeling coercions introduce many semantical inconsistencies, which are the source of so many WATs and WTFs that make JavaScript the butt of many jokes.
@aromanstuff
@aromanstuff 13 лет назад
ROFL! Was anyone else kicking themselves hard when he spoke about how JS is the only language people start using without actually learning it? He fucking nailed me on the head right there! Brilliant.
@st0rmchild
@st0rmchild 14 лет назад
I've watched this talk four times, and get something new out of it every time. This should be required viewing for anyone writing JavaScript.
@anime-grind
@anime-grind 10 лет назад
A great lecture on the JavaScript language! The most enlightening part for me was the discussion at 28:08 about the Module Pattern and - following immediately - Power Constructors.
@francescomm
@francescomm 10 лет назад
The only language where months are labeled from 0 to 11 and days from 1 to 31. The problem with Javascript is whoever thought about all the little details in the first time was nuts.
@DavidCriketGD
@DavidCriketGD 4 года назад
francescomm lmao
@ValentinBaca
@ValentinBaca 4 года назад
It's not the only language. This is adopted from the C Standard Library time.h tm structure: www.cplusplus.com/reference/ctime/tm/
@captmcneil
@captmcneil 4 года назад
​@@ValentinBaca Thanks for this. I guess the reasoning here (month enums?) is too far fetched for the kids who upvoted this because they think they understand everything immediately with their "common sense" ;-)
@fabio_oid
@fabio_oid 9 лет назад
I love how he dismissed the first question :)
@isochronous
@isochronous 12 лет назад
You can either have your closure return an internal reference (singleton pattern), or you can just set a breakpoint within the closure (via firebug/dev tools, or by putting in the "debugger;" keyword above the code of interest), which will pause the execution within the context you're interested in.
@-taz-
@-taz- 14 лет назад
This is one of my favorite youtube videos ever. It's kind of funny too because the speaker sounds so much like Bob Newhart and has a similarly dry sense of humor I really appreciate. But the content is what really makes it so great.
@ABCDwp
@ABCDwp 14 лет назад
@Kam3k You missed the () at the very end of the declaration of digit_name: notice that it ends in "}();" not "};", which calls that closure immediately and stores the result in digit_name.
@JustinBumpusBarnett
@JustinBumpusBarnett 10 лет назад
Garrett Wills Even though this is 5 years old, it still has good insights into JS.
@TonyBrowndesignanddevelop
@TonyBrowndesignanddevelop 12 лет назад
I love javascript but I realize I just know how to use it but not really program with it, which is why I am going to really learn this language.
@valentynvasylenko9985
@valentynvasylenko9985 5 лет назад
Who would have thought that JavaScript was going to become the language we all know and love today. Love it or hate it, but the amount of stuff you can do with it nowadays is just mind-boggling.
@doubleastudiogames
@doubleastudiogames 11 лет назад
Any language that interests the learner enough and minimizes pitfalls to help with the development process is not a bad example for game development. Just because its not the industry standard does not mean that valuable concepts cannot be realized from making games in Java. If someone wants to learn to program games in Java, there is absolutely nothing wrong with that, and as long as they get a firm grasp on the 'why' things work, the transition to C++ will be relatively easy.
@isochronous
@isochronous 12 лет назад
It doesn't matter if they can see what you're trying to accomplish, because the cross-domain restrictions on .js files keep others from executing code cross-domain. I don't understand what you see as insecure. You're right in that server-side validation should be performed on any user-supplied data in addition to client-side validation, but generally JavaScript/jQuery code is more concerned with GUI than it is with heavy data manipulation (of course, there are many exceptions).
@UloPe
@UloPe 15 лет назад
Very nice. Interestingly every feature he mentions as "good" is also a feature in python.
@liusu2009
@liusu2009 12 лет назад
Yes. actually there not a light weight but smart IDE for javascript.
@schelp
@schelp 12 лет назад
I feel your pain, but you have to keep in mind that this was posted in 2009. Much has evolved since then, and much in the favor of HTML5 and JavaScript. The question I have now is what JS framework(s) to use. There's about a bajillion out there (look up TodoMVC on google).
@zuallauz
@zuallauz 11 лет назад
Absolutely correct Dave. I'll stick to my beautiful Allman style code and take a few precautions when returning an object literal.
@ecereto
@ecereto 11 лет назад
34:21 I love Javascript and I completely understand how Douglas feels in this part. If you just watch 2 minutes of this video start here 34:21
@DaveStewartLondon
@DaveStewartLondon 12 лет назад
30m39s. This is only relevant for the return statement, and is easy to solve! 1) Pre-declare your object literal and return the variable 2) Wrap the return expression in parenthesis 3) Place the opening curly brace on the same line. Saying "placing block-opening braces on a new line is wrong" is wrong.
@bug-deal
@bug-deal 14 лет назад
@Kam3k in the closure version there is a pair of parentheses after the function definition, which immediately executes the outer function and assigns the result to the variable. you probably missed them when you were typing it up.
@runeguldberg
@runeguldberg 14 лет назад
This is my favorite . This is great talk. Though I dont know what Javascript is at all.
@Avelx
@Avelx 9 лет назад
Just to ask a quick question to anyone who may know. Does the prototype chain compile the function to memory and leave it in memory until the window closes?
@ZerqTM
@ZerqTM 15 лет назад
Love this book! It should be obligatory reading for everyone who studies webdevelopment. This was an eye opening speech.
@Gameboygenius
@Gameboygenius 12 лет назад
3:19 "In the JavaScript community, there is no love." Call Paul Irish!
@horridohobbies
@horridohobbies 8 лет назад
JavaScript is not misunderstood. We understand it very well: medium.com/javascript-non-grata/samson-and-javascript-3ff39a4f836d The Good Parts don't make up for how dangerous it is to use this language, esp. for software engineering at scale: medium.com/javascript-non-grata/javascript-s-sword-of-damocles-47256cf17b5a What does JavaScript "get right?" What makes it so "expressive?" Functional programming capability? This is not unique to JavaScript, and many other FP languages do it better. Object prototypes are the building blocks for class-based OOP. They are a low-level facility. As such, they make it much more difficult to refactor your code. For example, how can you examine the object relationships in your code, the inheritance hierarchy? You'd have to follow every line of source in every function looking for instances of object instantiation, whether done through object literals, constructors, delegation, or concatenation. This is awkward beyond imagination. With class-based OOP, you simply look at the _class definitions_, typically via a "class browser" in your IDE (eg, Visual Studio, IntelliJ, *Smalltalk*) which is able to easily extract the inheritance hierarchy from the code. This difference from classical inheritance is what makes JavaScript impossible to _scale_ in size, making your code much harder to maintain. It makes it much harder to _understand_ your codebase. In the end, this is what compromises your application's _reliability_.
@1DJLNR
@1DJLNR 8 лет назад
Yes we understand it but many obviously don't aka jquery and angular etc etc are around and don't give me that browser support crap, we all know if anyone really wants to access a page to view it properly they will use the roght browser, also since the flash player days many have ditched internet explorer.
@titegtnodI
@titegtnodI 11 лет назад
If you're arguing that Java is good for the designers who don't have a team of their own (hobbyists), then I can only agree with you. As a software engineer though, my primary choices would be C, Go, and Python (mainly for prototyping).
@jondissed
@jondissed 12 лет назад
In the 'bad' list, he forgot: - Debugging closures. A call stack full of anonymous functions is a nightmare. - IDEs all suck because intelligent code completion is impossible.
@WesleyOverdijk
@WesleyOverdijk 13 лет назад
Great great talk.... Looking forward to more...
@Jon47
@Jon47 12 лет назад
There are IDEs for Lisp and Scheme too, everybody still uses emacs
@bobanmilisavljevic7857
@bobanmilisavljevic7857 10 месяцев назад
I think after 11 years this deserves at least 1 thumbs up 😎👍
@aikeru
@aikeru 12 лет назад
Your second point isn't true -- Visual Studio 2010 does a great job at JavaScript code completion. For libraries that it doesn't parse well, you can make a special reference JavaScript (that doesn't get published) and use a reference tag. As far as closures go -- you can name the function in a closure ie: (function myClosure() { /* my code */ })(closureArgument); so I wonder if this might help your issue..
@yraydhitya
@yraydhitya 13 лет назад
I have just started learning javascript from common programming languages and this video make me easier to learn it =)
@joshux3210
@joshux3210 11 лет назад
The speaker's book: Javascript: The Good Parts
@justgivemethetruth
@justgivemethetruth 11 лет назад
OK ... we need to learn Javascript ... BUT ... what is a good book to learn Javascript that does not push you off to some programming environment or library system that is just a layer on top of Javascript? Where is the best most complicated stuff out there to learn Javascript?
@GOWRISANKARAS
@GOWRISANKARAS 7 лет назад
damn, he nailed it when referring to GWT at around 4:09! and it looks like Google is still using GWT in 2017
@evhwolfgang2003
@evhwolfgang2003 13 лет назад
I love GoogleTalks. Thanks for posting this. I'm one of those people who learned PHP and though JavaScript would be way too easy to bother. Its not!
@MartinOfSomeName
@MartinOfSomeName 15 лет назад
Very nice... I've bought the book while watching.
@ThunderAppeal
@ThunderAppeal 13 лет назад
When he said: "And finally from Perl we get a really horrendus regular expression syntax." I can sense he lost the audience and they were all dying to scream at him to tell him 'YOURE WRONG DOUG!!'
@Ki1ngOfGods
@Ki1ngOfGods 9 лет назад
This is the father of all fathers when it comes to javascript.
@essellar
@essellar 12 лет назад
You certainly can build enterprise apps in Lisp-and in JavaScript, which is _not_ just a front-end language for the browser. If you're a JVM shop, there's Clojure and Rhino on the JVM. There are implementations of both on .NET. There are also Node.js, CouchDB and Lotus Domino XPages (and it doesn't get much more enterprisy than that, unless you actually want to use J2EE). It's hard to find code monkeys for 'em, but let's hope you don't really want them around anyway.
@ofranja
@ofranja 11 лет назад
Lambda comes from Alonso Church (Lambda Calculus) and LISP, not actor model. Apart of that, the talk is very interesting. The module constructor pattern seems much like functors specialized on runtime.
@gridifierjavascriptgrids5643
@gridifierjavascriptgrids5643 9 лет назад
From my experience inheritance(prootypal inheritance) should never be used in your development cycle. When you are extending one object from another, you are making the worst form of coupling you can have. It is much better way to use composition instead IMHO.
@SoulofAnotherDeity
@SoulofAnotherDeity 7 лет назад
inheritance _is_ composition. object = a bundle of behavior (methods) and state (properties) class = an object constant that is instantiated into copies abstract class = a class that cannot be instantiated final/sealed class = a class that cannot be inherited mixin = a class that doesn't inherit from any other class trait = a class with no state interface = a trait which declares behavior but doesn't implement it class Foo extends Bar { } is equivalent to class Foo { using Bar base; } The only difference between inheritance and composition lies in memory layout, which doesn't matter in a dynamic scripting language.
@PBJYM
@PBJYM 4 года назад
I know you posted this 4 years ago, but if you haven't already checked it out Rust might interest you. It an Object Oriented like language but without inheritance, it uses Traits for composition.
@honkskillet
@honkskillet 11 лет назад
OOP is fine if you are just getting a Minor in CS or tinkering in the subject but if you want to master Computer Science (Major level or beyond), you should really start with the fundamentals of procedural programming (in particular pointers). Only once you this should build on top of this foundation with OOP.
@theblang1
@theblang1 12 лет назад
Excellent talk!
@jtnix
@jtnix 14 лет назад
Umm, now I know where Resig, umm, learned his speaking style.
@danilaplee
@danilaplee 9 лет назад
so lucky we are to have es6 and node.js in our days
@danilaplee
@danilaplee 9 лет назад
+Mandar Ponkshe I'am a full stack js developer building realtime app distribution servers, video servers, other kinds of servers, mobile apps, websites, desktop apps, different daemons, and all this stuff using only js. thought i have some php background, php is a far more worse language than js to build servers, and ofcourse you don't need any php if you are only building spa client apps. Thought some basic knowledge of php would always be nice in the modern web world
@SuperAsfath
@SuperAsfath 9 лет назад
+Danila Plee : I'm just entering the advance concepts of JS. What are the things I should aware to get in deep with Full stack JS developer?
@wildbirdink
@wildbirdink 9 лет назад
+Danila Plee are you saying PHP is not worth learning? and its better to focus on JS and node.js?
@rax313
@rax313 14 лет назад
this is a great talk even though I am new to Javascript
@dowling1981
@dowling1981 15 лет назад
But the speech itself is on youtube, ken?
@McGavel1
@McGavel1 9 лет назад
Cool, thanks for the info! I got the book but haven't read it yet. I'm gonna start reading it after this video :)
@izziw564
@izziw564 11 лет назад
Ok, so I'm a 12 yr old kid, I have a real interest in computers and I am top in my grade at school. Would you say me trying to learn JS is aiming too high??
@CroneKorkN
@CroneKorkN 13 лет назад
@aromanstuff: That single statement made we watch the hole presentation ;)
@sniddler
@sniddler 15 лет назад
Great! Um.. whats with the 'floating Crockford' that starts at 3:45?
@GOWRISANKARAS
@GOWRISANKARAS 7 лет назад
I don't see/hear anything like that at 3:45. was this video modified since you commented?
@TheOlian04
@TheOlian04 7 лет назад
At 14:00 the thing about eval(), webpack heavily relies on the use of eval(). Is eval() still as bad as it was?
@24oscar24
@24oscar24 14 лет назад
i fukken love google tech talks.
@tagnasnamatsu
@tagnasnamatsu 11 лет назад
webworkers were not around during the time of the talk?
@titegtnodI
@titegtnodI 11 лет назад
Java pretty much is the industry standard for making games these days. I can't argue Java isn't good for prototyping games though. It's when they release said game, with a heavy load, and high memory usage, and never ever ever use another language to improve their game.
@hobolooter
@hobolooter 15 лет назад
Whats your point? So what if its a feature in Python, that doesn't negate the assertion that its a good feature.
@Microtardz
@Microtardz 11 лет назад
Ofc it isn't. The beginners language is C++. Then you move into your C so you can make your snippets if need be, then you move into your higher level languages that use the C/C++ syntax, like javascript & php. A high level language is really not a good basis to learn, especially considering most are completely object oriented(javascript included).
@dbBrother
@dbBrother 15 лет назад
Great talk...Great book...Rock On!
@MrAzulay
@MrAzulay 11 лет назад
That just makes the use of === more preferable
@chrismorris5241
@chrismorris5241 5 лет назад
ES5 (2009) vs ES9 (2019)
@DEdesigns571
@DEdesigns571 11 лет назад
Besides loose typing, that short list of good parts would only accommodate more experienced programmers. Never the less I will continue to learn this language as my first language but it is not a good beginners language overall.
@tyson31415
@tyson31415 2 месяца назад
Javascript really is a minefield.. but if you know where to step, its also a very fun language.
@ThunderAppeal
@ThunderAppeal 13 лет назад
Javascript is not held in very good esteem. Well for very good reason Doug.
@cantwaittowatch
@cantwaittowatch 11 лет назад
i see the discussion more of a beat around the bush than the relevancy
@DavidNorthUK
@DavidNorthUK 14 лет назад
The closure version of digit_name doesn't work for me, calling digit_name(3) just returns a function which Is what I'd expect looking at that code. To get the name you'd have to do digit_name()(3) i.e. call the returned function. Can anyone explain how that is supposed to work?
@Gameboygenius
@Gameboygenius 12 лет назад
Pay closer attention to the examples. Those two lines do exactly the same thing, which is test #3 in the list. All of the examples are (or should be) true even today.
@KiSh0dan
@KiSh0dan 12 лет назад
As for IDEs: try Netbeans, works like a charm for me!
@DEdesigns571
@DEdesigns571 12 лет назад
54min into the video he claims HTML5 and JavaScript are going in a bad direction? I have spend months trying to find the right programming language to learn and a book to go with it. I came up with Head First HTML5 Programming. Now after hearing this I am not sure If I should continue reading this book. I dont want to go in a bad direction with this.
@incompatibleTypes
@incompatibleTypes 12 лет назад
It is really hard for me to start coding in JavaScript after 5 months with C#.
@whatnow1204
@whatnow1204 12 лет назад
@incompatibleTypes Same with me, mate. I studied C# (didn't really dive too deep in the language though) for about 6 months at the most. When you get into javascript, the language can be very confusing if you're coming from a strongly typed language like C#. What really confused me with the javascript language, is the use of functions, prototype, prototypal inheritance, and object literals. I guess because java and C# supports classical inheritance, but javascript doesn't have any classes in it.
@yoggg932
@yoggg932 10 лет назад
I love the video, its amusing and entertaining and informative.. and Doug is a great narrator. BUT, I think after 5 years of front-end dev and maybe 2 or 3 of these really trying to get into JS, I just realize, the initial simplicity of the language is a trap. Its actually quite complicated, and, unfortunately, it just doesn't make sense. For example the weak typed variables and the fact you need to put a function in a function in order to make your variables private... Sorry but that doesn't make sense. I haven't done lots of development, but I bet there are many other languages which are simpler to get.
@Spudst3r
@Spudst3r 9 лет назад
You will feel spoiled when you use Python or Ruby.
@oliverweiss7175
@oliverweiss7175 7 лет назад
You should give TypeScript and ES6 functionality like "let" keyword a try!
@samgamgee3622
@samgamgee3622 7 лет назад
...except it isn't supported in any web browsers yet.
@pitso7777
@pitso7777 11 лет назад
hi so i been listening to this for 11mins and all i want to know can it make games, apps, android apps, computer games, and software what can it make.
@frizzell83
@frizzell83 13 лет назад
"Umm" this is good video, "Umm" Doug whats your favourite word ?
@Microtardz
@Microtardz 11 лет назад
Because memory allocation in C is a basic requirement of C. It's virtually unavoidable when using the langauge due to the libraries of C. Why not start them with assembly hurr durr?? Most colleges I've seen start beginners with the BASIC programming language. Also, pointers aren't even difficult. It's using pointers in the real world that's difficult. By the way, news flash, C/C++ is what powers the majority of applications. May as well start them on that path.
@stevenhamilton8196
@stevenhamilton8196 6 лет назад
As I know, null is considered to be an empty object reference so there no issue to typeof!
@kronykus
@kronykus 11 лет назад
I have to disagree with you about OOP. I find it easier to get people to grasp the concept of objects and inheritance... ie. a dog is an object... a poodle is an object that inherits from dog...
@kronykus
@kronykus 11 лет назад
Actually, Java would be the beginner's language. Saving memory management/pointers and their associated gotchas for later is much better for a beginner just trying to grasp how variables, methods/functions, constructors/destructors, etc work
@jamin2288
@jamin2288 14 лет назад
really great talk - Crockford has also done a great series of javascript tutorials on video.yahoo.com - also mp4 for download on kiwi.kz :) - his book with the same title as this talk is well worth getting ahold of whatever level u'r at coding-wise.
@MichaelPohoreski
@MichaelPohoreski 9 лет назад
@34:31 _"Why am I betting my career on this piece of crap"_
@dowling1981
@dowling1981 15 лет назад
Have you tried googling it?
@MsGameronfire
@MsGameronfire 12 лет назад
true, what do you use
@BillPullen
@BillPullen 11 лет назад
short answer yes. 11mins the talk is an hr long dont think they touch on this but might be worthwhile to watch the whole talk.
@TangerineTux
@TangerineTux 14 лет назад
Looks like he doesn’t know the difference between strong and static typing. :/ Maybe because JavaScript happens to have neither.
@UloPe
@UloPe 15 лет назад
Whats _your_ point? I was merly observing that all those things have been in python for quite some time.
@revolutionize017
@revolutionize017 15 лет назад
no HD?
@11889music
@11889music 14 лет назад
Bookmark: 11:45
@dowling1981
@dowling1981 15 лет назад
Better than Tim Collins' speech?
@marcuscarneiro
@marcuscarneiro 11 лет назад
take an online course in introduction to programming, the language doesn't matter. there are good ones in cousera, edx, etc... after that learn your language of choice, build the type of things that interests you. without the basics your code will be like a google translated text, the words are right, but the overall thing is meaningless...
@Shockszzbyyous
@Shockszzbyyous 10 лет назад
0 == '0' should be false right? and false == '0' why the hack is that true ? and that last one with the string how ? are strings '\0' terminated? and it evals the last element in the array of strings? aaahh my head hurts.
@CheshireSwift
@CheshireSwift 10 лет назад
These are the result of it converting types to try and find equality. 0 == '0' because it realises both are zero, kinda. false == '0' for the same reason, '0' is interpreted as 0 which is false when used as a boolean. Nothing to do with null terminators, there's an explicit table of conversions that it is willing to make. And this is why people recommend avoiding it and just using ===.
@kronykus
@kronykus 11 лет назад
and let's see.... java in every bluray player, car, most anything electronic... including PC's... you do realize there's a whole world of applications that aren't written in C/C++ right? which throws your "nearly every application you could name from gaming or otherwise" argument out the window. So... bro... I believe your attitude shows your maturity, and this off-topic discussion is at an end. Reply all you want.
Далее
The Post JavaScript Apocalypse  - Douglas Crockford
54:13
Rate our flexibility 1-10🔥👯‍♀️😈💖
00:12
My Unconventional Coding Story | Self-Taught
27:14
Просмотров 649 тыс.
Google I/O 2011: Learning to Love JavaScript
1:03:26
Просмотров 234 тыс.
Crockford on JavaScript - Act III: Function the Ultimate
1:13:29
ECMA 6 JavaScript, the Good Parts - Jennifer Estrada
50:46
The Better Parts. Douglas Crockford. JS Fest 2018
55:59
Stop Writing Classes
27:29
Просмотров 937 тыс.
Douglas Crockford: The JavaScript Programming Language
1:49:55
Why Rust is NOT a Passing Fad...
8:54
Просмотров 41 тыс.
Rate our flexibility 1-10🔥👯‍♀️😈💖
00:12