Feels like "the ancient one" from Dr. Strange send him in multi dimension space.
@Pop-zb3wr5 жыл бұрын
An amazing talk, with an amazing man, on an amazing stage.
@DoggyXomaX27 күн бұрын
This guy says to use forEach instead of for, but libraries still use the for loop because performance should not be overlooked. Preallocation is also a good practice.
@Hetzi109 жыл бұрын
I just realized every program I wrote in Java was actually a bug
@njhabib9 жыл бұрын
Gota love the tailcoat...well done Douglas Crockford
@jorgeriveramx8 жыл бұрын
It is always very interesting to hear Douglas ideas. (Even when I don't always agree with him)
@gbitdot9 жыл бұрын
Just when I think I am getting it. He never ceases to confuse me again.
@mostaza14649 жыл бұрын
Fantastic!
@dan99487 жыл бұрын
If more students / professionals had a decent understanding of the history of CS, they'd see that this man is a genius. Spot on, man!
@zad0m3 жыл бұрын
this man is not a genius. using for each instead of for... wow waste memory much on temp functions? maybe they didn't have `for of` back then
@jameslongstaff62329 жыл бұрын
Really interesting talk
@edgeeffect9 жыл бұрын
This man in Software Development's answer to Robert Anton Wilson! :)
@a8lg6p2 жыл бұрын
I would be so happy if classes went the way of GOTO. I'm on an Angular project, and it irritates me how it seems to pressuring me into pretending I'm using Java, usually for no reason I can see other than to cater to Java/C# programmers who don't understand how JS works and think the way you're forced to do things by the (arguably not so great) design of those languages is the only correct way to write code.
@Roboprogs8 жыл бұрын
"Falsy" values from C? I think Lisp had that concept, as well: NIL and empty list are false equivalent values, if memory serves.
@unutilized3 жыл бұрын
fantastic talk!
@piq-dg3vz7 жыл бұрын
The Granddaddy of Javascript
@ShaunakJadav8 жыл бұрын
Greate Growth Douglas Sir.... Very nice addon and curve to JS and upcoming ES7 is really great growth... :)
@nielslangagerellegaard98749 жыл бұрын
Nice talk, but the cameraman should film the slides rather than the speaker.
@orcrist4843 жыл бұрын
I don't like tail recursion - I find it even more obscure than normal recursion which I never use. I would prefer a loop any day. Programming features that are designed primarily to make code simpler or reduce logic bugs seem to me like engineering a car to be simple for the mechanic to maintain. That's helpful, but not a compelling reason to change paradigms. I have introduced far more bugs recently trying to figure out the new construct for a lambda expression, loop comprehension, etc., than I ever had with for loops, 'this' pointers or nullability.
@lebroncarmelo15238 жыл бұрын
I think es6 lot of features are wrong.
@JoelBergerPhD9 жыл бұрын
Ok, please can we notice how many of these features Perl has already had for 20 years!
@DavidDelikat9 жыл бұрын
interesting guy, really not sure if he knows what he's talking about or not. he mentions quite a few tidbits, perhaps he has a non-technical audience and so leaves out the parts that I would like to hear. his new data type is actually a reduction in range from a double. he has transferred 3 bits from the exponent to the coefficient. while he may have changed some other properties of the numeric format, he really has not improved on the standard double float value. also, the people he needs to convince to use this new data type are the CPU manufacturers. I am disappointed that he seems totally ignorant of perl and the number of innovations it has made over the years. his general statement that outdated technology as 'bad ideas' doesn't inspire any confidence in his new ideas.
@Roboprogs9 жыл бұрын
Joel Berger I think that Javascript and Perl 5 are roughly the same age. Perl 4 did not have the blessings of lexical variable scope, references, closures nor an object call syntax. It seems both languages (JS & P5) where chasing many of the same goals at about the same time, so I would be hesitant to accuse one of ripping off the other. As much as I like Perl (often one of my language-of-choice selections for little home jobs), it's not available in a browser, and the rest is history.
@JoelBergerPhD9 жыл бұрын
Roboprogs Perl 5 was released in 1994 (ref: perldoc.perl.org/perlhist.html) Javascript was released in 1996 (ref: developer.mozilla.org/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript). The features that ES6 adds, those that mimic Perl, and are being touted as new and wonderful, have been in Perl since before Javascript existed and are basically unchanged since then. I am happy that Javascript is becoming a better. more usable language. I object to the claims that it is being born of their own creativity and not on the backs of the innovation of other languages before it. JS's strict mode is enabled using the phrase 'use strict' for goodness sakes! Exactly the Perl mechanism, except since "use" doesn't mean anything in Javascript, it is just a magic literal. The list of stolen features goes on and on. Again I don't care that they are stolen, just say "we are taking these from Perl, since, for all its warts, it got a lot of things right".
@Roboprogs8 жыл бұрын
+Joel Berger the "use strict" thing is pretty funny, and is a pretty obvious "borrowing". Despite a fuzzy memory on the Perl 5 timeline, I'm pretty sure that Perl also borrowed things like closures from other earlier languages, as well. (e.g. - "code blocks" in Clipper 5, and wherever *they* borrowed that from...)
@TheGoodMilkMan8 жыл бұрын
+Joel Berger cube-drone.com/comics/c/pipes
@evolutionxbox8 жыл бұрын
How do you inherit accessor properties using his approach (module revealing pattern)?
@artit91 Жыл бұрын
... spread operator to inherit stuff
@MichaelQuad5 жыл бұрын
cool talk
@AlexeyLuchko7 жыл бұрын
By the way, for counting money any floating point, decimal or binary, is deadly. What money do really need is fixed-point type. And even then 21% of £0.15 that every tax service makes you count precisely disregarding whatever crazy results it could produce. This leads to sacred knowledge of bookkeeping, that among other quite hard depends on country.
@JonathanRose24 Жыл бұрын
This comment section is wild. People acting confidently like they understand JS better than Douglas Crockford. Trust me, he understands JS better than you
@CunningZombie8 жыл бұрын
I think TypeScript is the hero that we need.
@bensheppard22587 жыл бұрын
TypeScript is still just JavaScript. It gives you a "class" keyword, but it is still only JavaScript. The way that they implement classes, especially private properties and functions, is not the best way it could have been done. Even in the current version of 2.1.4.
@HermanWillems6 жыл бұрын
Damn your generation is blocking us from Functional Programming. Class must die. Typescript isn't the holy grail.
@HermanWillems3 жыл бұрын
@Julian Coy My opinion changed a bit. I rather would use typescript thant Javascript. But... currently both are useless. As i can write Rust and compile that to Webassembly which blows both javascript and typescript out of the water. The future is webassembly. I still dislike classes. Rust has not classes but structs with traits which seperates state and logic. Unlike classes. In javascript you use mixins. So conclusion: with Rust you can fully write backend and frontend without needing javascript or typescript with more performance. Webassembly is also the driving force behind web 3.0 and the newest blockchain technology.
@krillgar3 жыл бұрын
@Julian Coy TypeScript is still a superset of JavaScript. That point hasn't changed. However, the type security of parsing and compiling JavaScript is immensely helpful. Classes in ECMAScript 6 is still the worst way it could have been implemented. All that being said, I would never write an application in VanillaJS again given the choice.
@ivankudinov4153 Жыл бұрын
@@HermanWillems and what as of today? Just curious since you'd replied 5 years ago, then 2 years ago
@xerxius54464 жыл бұрын
What ?? 0.1 + 0.2 === 0.3 is false ? how have i never realized this ?
@balasuar3 жыл бұрын
Thank you IEEE 754.
@mpcref8 жыл бұрын
apparently, Douggie has never heard about Haxe...
@mkomovffdfewrwqwerqw8 жыл бұрын
"I added some functionality to a language, specifically because I wanted it there. But you know, I don't use it anymore. It's wrong. Sorry for 999 ways to create a prototype. And you know also, we should search for something better than JS. I know I'm on JS conference and I'm a senior JS architector, so I should be positive about my language, but you know it's so shitty I can't hold it." Jeez, maybe JS would be a great language if its main architector wasn't completely nuts.
@Elite75556 жыл бұрын
Yeah... So now prototypes are bad, classes are bad, but the awkward shit he calls a constructor, that is the best way to do it. Fucking hell... Is that man even serious? What even is his problem with "new"? And how exactly are prototypes better than classes? He himself uses Object.freeze just to make sure nobody messes with his stuff. So where exactly is the power of the prototype?
@AlexeyLuchko7 жыл бұрын
0.1 + 0.2 is quite rare case, isn't it? How about 1/3 + 1/17, or at least 1/3 + 1/3, 1/3 + 1/6. And for sure it woun't be able to handle 1/3 + 10^6/3 precisely. There are no more precise decimal fractions than precise binary fractions, not counting they are a bit more dense. For every other number than an integer or a precise decimal fraction dec64 will provide the same "crazy" stuff instead of a real number meant in there. When counting money you do really need decimal behaviour and you are ok to have them slower. But don't we have banking solutions, credit cards, etc already running in full steam? The real goal is to *educate* about what the binary numbers are, and make programmers aware of their caveats. And this will hold for any non-precise representation of numbers, binary, decimal, whatever. Because in any case nonprecise number type is counterintuitive.
@midaz75 жыл бұрын
The pain point is that even something that can be calculated by hand, something as simple as 0.1 + 0.2 gives a wrong answer (I recall this causing some hilarity when learning and trying to code Dijkstra's shortest path algorithm; some distances just didn't compute as exactly the same). IMHO a 56-bit coefficient seems precise enough for most calculations... we cannot have absolutely precise values, so at least having such precision as promised by DEC64 seems a much better compromise. I think being educated about the special cases that cannot be handled by DEC64 would be much better than being educated regarding the shortcomings of the current implementations.
@orcrist4843 жыл бұрын
But null and undefined are semantically different. Null means a defined property has the value null, whereas undefined can mean the property either does not exist, or exists and has been given the value undefined. null has been useful in every other C-based language exactly because it corresponds to no other legal object value, so how do you replace that without using something contrived, such as 0 for an int or '' for a string?
@zad0m3 жыл бұрын
^ What he (she) said. Then there's also `property in obj` - which REALLY represents whether the prop is defined on an object. nulls are very useful for type-checking, as undefined semantically means the value of an attribute, whereas null has more to do with its type.
@krisajenkins8 жыл бұрын
"With this feature, JavaScript becomes a real functional programming language." No It dOeSN't!!! o_O #brainexplodes
@Roboprogs8 жыл бұрын
+Kris Jenkins Well, it will never be Haskell (and probably doesn't want to be), but it's closer to Lisp.
@krisajenkins8 жыл бұрын
+Roboprogs That's certainly true, but it's a very different claim than the one he's making.
@evolutionxbox8 жыл бұрын
+Kris Jenkins Why is it not? "Javascript can be used as a functional language, in fact it does it quite well... It is possible to implement monads has support for a lambda construct etc."
@krisajenkins8 жыл бұрын
+Jonathan Cousins The short answer is, because it offers almost no support to control side-effects. The long answer I've blogged here: blog.jenkster.com/2015/12/what-is-functional-programming.html
@evolutionxbox8 жыл бұрын
+Kris Jenkins Nice article, but it still doesn't negate the fact that JS is a functional language or at the very least, can be one. Side-effects does not a functional language negate.
@Laggie746 жыл бұрын
He sounds very knowledgeable, but more of an academic than practitioner. Get rid of classes? Passing in an object of unknown type as your parameter??? Sure, just pass whatever you want and try your luck, right? It's easier for the guy writing the code, but think of the confusion when you try to use it or worse, to maintain it. You can't base your hopes on a team of developers with telepathy. I can't imagine working with his code. If you are looking for sanity in Javascript, go checkout Typescript.
@Dylan_thebrand_slayer_Mulveiny5 жыл бұрын
I think the passing in an object as a functions sole param is a solid principle for the reason he stated. You don't have to worry about the order or number of parameters. You can easily see the function and what values it uses, and pass them in as an object. It's really the best way to create a function that's easily refactor-able with minimal pain. It also makes the function a lot easier to understand. This is the sole point of the lecture that he actually made sense on. The rest of the shit he spewed was pure gibberish.