Dconf 2014 Day 2 Keynote: The Last Thing D Needs -- Scott Meyers

  Рет қаралды 17,709

The D Language Foundation

The D Language Foundation

Күн бұрын

Пікірлер: 42
@Novous
@Novous 6 жыл бұрын
I freaking LOVE that mans hair. That is a man who says "The 70's were rad and I'm never leaving them, and I don't care how much other people talk crap about me."
@chrisanderson687
@chrisanderson687 6 жыл бұрын
Totally!
@pawebis4656
@pawebis4656 5 жыл бұрын
I think that it's more about himan, than 70's
@absurdengineering
@absurdengineering 4 жыл бұрын
70-s or a few centuries ago-s :) Dude looks like a time traveler. And that shirt just seals the deal for me. The way it billows - it’s special and way cool in my book.
@snippletrap
@snippletrap 2 жыл бұрын
Looks like John Fogerty circa 1969
@artombakrial-sarmini4968
@artombakrial-sarmini4968 5 жыл бұрын
No one mentioned that vector is actually not a SequenceContainer. One and only exception for vector
@ijoyner
@ijoyner 4 ай бұрын
Around 47 minutes, Scott gets to the point. In C++ you are focused on the tool itself, rather than what you can do with the tool. It is a great graphic he uses. Programmers should be focused on their problem, not on the tool. Then he debunks his own work. "182 Guidelines!". I have posted about this needing to write officious 'style' documents for each project telling programmers what to use and not use in C++. With languages designed from the ground up, these things are just in the language without thinking. And, I agree, that other languages should not require this army of consultants going around to support the language. That is another problem with C++ - it is a language that demands the programmer to support C++. It should be the other way around - a programming language should support programming and programmers. And that is not what is meant in another of those trite C/C++ platitude that such languages are 'just training wheels for beginners'. That has always been wrong, but too many programmers, especially young ones have fallen for it. From Scott's statement to the young programmers, they will spend the next 10 years trying to understand this stuff. Ten years to move beyond being a beginner, really?
@NoSpeechForTheDumb
@NoSpeechForTheDumb 2 ай бұрын
The simple reasons why C++ is exactly like you (and Meyers) described are: 1. it's old, and 2. backwards compatibility. Nothing ever gets obsoleted in C++ in order to not break the billion tons of legacy code. This, however, is a deliberate design choice and the one single reason why C++ is still in heavy use everywhere in the industry: It compiles. 😉
@Sydra.
@Sydra. 5 жыл бұрын
Scott Meyers looks like an IT version of He Man with this hair. But he has really high IQ instead of big muscles.
@pedromiguelareias
@pedromiguelareias 3 жыл бұрын
C++0x, at the time, was the beggining of the end.
@zetaconvex1987
@zetaconvex1987 2 жыл бұрын
I realise how little I thought I knew about C++.
@ijoyner
@ijoyner 4 ай бұрын
Hopefully that leaves you with the feeling of wanting to know even less!
@pedromiguelareias
@pedromiguelareias 3 жыл бұрын
They should have simplified C++ 2003. Most add-ons are solutions to problems caused by other add-ons. I also recognize pseudo-science in the standard library.
@heyheyhophop
@heyheyhophop 3 жыл бұрын
Interesting, could you provide some examples?
@pedromiguelareias
@pedromiguelareias 3 жыл бұрын
@@heyheyhophop Sure. Use C++ everyday. Auto? Function(al)? Enum classes? Constexpr? Variant? Any? For(each), smart pointers among dozens of other addons are sugar with the side effects of sugar. Even C++03 ingredients such as enums are better implemented with a struct with constants. A lot of template tricks are just tricks with meager benefits. Pseudo science in STL? Everywhere. What computer scientist uses std::set or std::list? Who in her right mind would directly sort a std::vector instead of determining the order? Besides Stroustrup and 2 or 3 others... And BTW, I know that Bjarne does not agree with the added weight.
@Kenjuudo
@Kenjuudo 5 ай бұрын
bump
@Bolpat
@Bolpat 3 жыл бұрын
Saying it's a “special rule” reminds me of the euphemistic use of that term for people with mental challenges.
@xorbe2
@xorbe2 3 ай бұрын
But 24:47 auto x4 { 0 }; is int as of C++17. Slide at 28:45 was never shown.
@1schwererziehbar1
@1schwererziehbar1 Жыл бұрын
By the power of Grayskull!
@GeorgeTsiros
@GeorgeTsiros 5 жыл бұрын
int x1; has an indeterminate starting value because the variable is just defined. The compiler hasn't yet decided even if it's going to allocate memory for it. It might never even *get* a value because it got optimized away.
@skepticmoderate5790
@skepticmoderate5790 4 жыл бұрын
It hasn't even been defined. It has only been declared.
@movax20h
@movax20h 4 жыл бұрын
Not in D. x1 will have value 0. If you don't take its address, and first op you do is write to it, or do += or something like that, it will be optimized by the compiler. But you are free to usee it assuming it is 0. If you read it, it will read 0. If you take an address and pass it somewhere to read or do read-modify-write, it will have zero in it. 'int x1;' is a definition and initialization in D. Similarly references to objects are initialized to null. If you really really want to avoid initalization (which is useful for big arrays for example), is to use '= void;' It will help compiler and ask it to not emit code for initialization.
@code_report
@code_report 3 жыл бұрын
Anybody know at 22:10 who "the man who teaches comparative programming languages" is?
@stupid_sleazoid2
@stupid_sleazoid2 Ай бұрын
I second this question
@chrisanderson687
@chrisanderson687 6 жыл бұрын
This is a great reminder why I am truly done with C++. Hoping moving to D makes my life easier...
@Itachi.Uchiha.Offical
@Itachi.Uchiha.Offical 5 жыл бұрын
Move to Rust :)
@James-dw7un
@James-dw7un 4 жыл бұрын
How is D going? I am thinking about switching from C++ to D
@piotrarturklos
@piotrarturklos 4 жыл бұрын
​@@James-dw7un It's better than it has ever been which means you can be productive in D, but sadly it has got some accidental complexity to deal with, much like C++ but to a lesser extent. It's a bit like learning Vim: it will take some time before you are productive. My advice is to switch if you have a task that D enables you to do (like more complicated compile-time magic to do), otherwise probably not, unless you can make the time investment to learn all the aspects of using D.
@stupid_sleazoid2
@stupid_sleazoid2 Ай бұрын
so, six years have passed. How are things going on with D? Is your life easier? Or you switched to Rust as someone here suggested?
@snow8311
@snow8311 5 жыл бұрын
18:10: how is this const int? it's just a regular int, the fact that it's const is due to the fact that the lambda's operator() overload is const qualified by default, unless you add mutable.
@איילחיטרון
@איילחיטרון 3 жыл бұрын
No, you are wrong. Even with "mutable", the lambda's internal copy of cx will still be const (unless you define it using init capture)
@Bolpat
@Bolpat 3 жыл бұрын
auto xs = { 0 } infers initializer_list to make the following lowering possible: for (auto x: { 1, 2, 3 }) {…} to auto&& __xs = { 1, 2, 3 }; for (auto x: __xs) {…} Or at least I guess so.
@cristiangomes6101
@cristiangomes6101 2 жыл бұрын
i have not even finished this lecture and i already decided i never gonna touch c++ again.
@dstgre
@dstgre 5 жыл бұрын
"Later specialization" (28:25)? Can someone explain what he meant by that please?
@migmit
@migmit 5 жыл бұрын
For example: some header (say, base.h) contains code for Base. Another file (derived.h) includes it and contains additional code for Derived. Now, yet another file (spec.h) includes base.h and specializes Base so that it doesn't have the method that Derived calls. Now if somebody includes all of that and calls a method on Derived - it would in turn call for a missing method in Base, which results in a compile error. When should we raise the error? The answer is: if it's called normally, we report the (possible) error immediately: we have no idea if such spec.h exists, we haven't seen it, but there is a possibility that it does, so, we play safe, and detect a potential error early. If it's called with this-> syntax, that's library author signals us: hey, it's OK, I promise, there would be no spec.h, and if it does appear - then you can raise an error.
@dstgre
@dstgre 5 жыл бұрын
@@migmit Won't Base will still continue to have the the method's declaration (at least)? And won't it be passed down to derived types via inheritance?
@migmit
@migmit 5 жыл бұрын
dstgre No. Partial specialization completely replaces the general declaration. Base, if it's specialized, would not remember anything from Base.
@absurdengineering
@absurdengineering 4 жыл бұрын
It means that C++ in a very basic way does not work like C. In C, you can generate machine code as you parse it. It won’t be great code, but you can do it. Literally: emit code after each definition or statement. In other words: you can parse C like you would Pascal. Single pass, and between each global scope declaration or definition you already have all the types resolved, and have valid assembly output. When you are past the final non-blank character while parsing the C file, you could be done emitting the code, ready to close the object file (some object file format oddities notwithstanding), without having to know that what’s ahead is going to be an EOF. There could be one more function there :) In C++ you could do it most times, except when there is any code that could change meaning due to later specialization. In most cases, this means that a lot of template type deduction precludes one-pass compilation: during the first pass (first phase), you can’t be sure what the code means. It’s quite stupid really, because as soon as C++ got two-phase-lookup, it could have dropped the need to forward-declare anything. In fact, by converting “plain” types to template types in a way that force two-phase deduction, you get the compiler to process all the uses of the type after the whole thing was parsed in the first pass, guaranteed. This is something you could add to (a 4+ year old version of) clang in a week or so (took me longer since it was done in fits and starts), and it’s not some dramatic change. Everything did still work fine, and no new problems were introduced (the test suite still passed - good enough for me). You could then add an option to clang-format to remove forward declarations, and to remove the silly syntax that selects between 1- and 2-phase lookup (the good old casting to a fully substituted type would take care of it just fine). So anything that the language allows to be specialized past the point you currently are compiling, you have to defer further processing of, and resume when you reach the end of translation unit (in general), or at best when you reach a specialization that is constrained by language rules to be the most specific one. Now, later on you may still end up aborting if multiple specializations would make it ambiguous in the context that one template type was used. But that doesn’t help much, since lots of front end optimizations require complete AST of a translation unit anyway, and nobody emits machine code as the parse in anything but toy compilers or very resource-constrained systems (say Turbo Pascal on CP/M, where the IDE, compiler, most of the source you edit, and the OS all fit into ~64kb of RAM).
@lunakid12
@lunakid12 5 жыл бұрын
Scott was so witty, and... hardly any laughter! Very disturbing. (OK, it gets better after some 20 minutes of warming-up.) As a rule of thumb, scheduling funny keynote speakers to a morning talk is a terrible waste.
@ijoyner
@ijoyner 4 ай бұрын
It is kind of trite to excuse the problems of C++ as humorous. The problems need to be taken far more seriously. It is OK to laugh at the time, but as long as the serious implications as burdens to programmers and difficulty in getting software to work and then debug and maintain are understood. Not realising that is the terrible waste.
DConf 2014 Day 2 Talk 2: Refactoring JIT Compilation -- Maxime Chevalier-Boisvert
43:57
The D Language Foundation
Рет қаралды 1,6 М.
DConf 2017 Day 2 Keynote: Things that Matter -- Scott Meyers
1:06:37
The D Language Foundation
Рет қаралды 13 М.
Which One Is The Best - From Small To Giant #katebrush #shorts
00:17
CppCon 2014: "Meet the Authors"
1:30:47
CppCon
Рет қаралды 43 М.
DConf '22: The Present and Future of the D Programming Language -- Átila Neves
48:46
The D Language Foundation
Рет қаралды 1,3 М.
code::dive conference 2014 - Scott Meyers: Cpu Caches and Why You Care
1:16:58
NOKIA Technology Center Wrocław
Рет қаралды 190 М.
CppCon 2017: Chandler Carruth “Going Nowhere Faster”
1:00:58
Three Unlikely Successful Features of D -  Andrei Alexandrescu
1:00:51
NDC Conferences
Рет қаралды 17 М.
Scott Meyers   An Effective C++11 14 Sampler
1:15:45
Amleto Fobia
Рет қаралды 22 М.
Zebras All the Way Down - Bryan Cantrill, Uptime 2017
46:37
Code & Supply
Рет қаралды 45 М.
Телефон - самая грязная ваша вещь
0:24
Up Your Brains
Рет қаралды 2,5 МЛН
Wireless switch part 177
0:58
DailyTech
Рет қаралды 11 МЛН
Apple-Designer aktualisieren das iPhone-Design 😂
0:13
Abuloris
Рет қаралды 2,9 МЛН
ВШИВЫЙ ИГРОВОЙ ПК с WB за 58000 тысяч рублей
22:48
Разматываю Xiaomi 14T после 13T - ты ТОЧНО ЕГО хочешь?
25:12
i-shoppers - обзоры от Саныча
Рет қаралды 33 М.