Today I read a section on mixins in chapter 3 of The D Programming Language and my jaw hit the floor. If you are a C++ programmer, you definitely need to try D.
this is an interesting presentation, but this guy might be the most annoying presenter ever-- why is he compelled to ask everything as a question before making a statement? "foo is bar. what does bar mean?" pause for five seconds. somebody gives half-correct answer. presenter gives correct definition. repeat.
18:37 I'm sorry Andrei but if you present incorrectly written program (incorrectly in the sense that it doesn't have return statement) and your args are based on this program you are just plain wrong. Add there return statement + try,catch and this program will behave correctly.
@FetrovskyGoogle Yes, it compiles faster than Go too, by a huge margin. Obviously Andrei didn't want to say that straight in the face of a room full of Google employees :)
@TheCyberShadow Thank you, I actually heard it, but it was long after I posted my comment :)... it's ridiculous how long it takes to build a C++ or a Java project.
@yudlejoza D and Go are very different. D is based on C++, and Go is based on C. D is intended to be C++ with better OOP. Go is intended to be C with useful, builtin concurrency. And that's just the simple explanation =P
I think if we are comparing D's correctness to C's correctness it is only fair to use C99 (which is, what, 11 years old?) and not more archaic versions :) The point about printf's failures not being reported is valid, but C hasn't returned a random value from main() in more than a decade.
Love the douchebag at 13:16 who can't listen (source, not headers) and has to prove himself right. It must really suck to work at Google, dealing with alpha-geeks like this all day.
You are wrong about the return value of "main" in your C example - if main() has no explicit "return" statement then the value returned to the environment (in a hosted implementation) is *not* 13 (or something that happens to be in the right register), but is in fact 0 by definition. See C99 section 5.1.2.2.3p1.
This comment has received too many negative votesshow
God-DAMNIT already ! Again with the aaahhh, uuhhhmm, uhmm, aaammm, uuuuuuu, aaaa....
What the FUCK is it with this goddamn AAAAAANNNAA, AAAA, taaahhuuuuu, uuhh, i have thisuuuu, and this bookaaahhhuuummm, sooaaa, aaahhmm, alright aaamm, aaamm, i'm sure aammm that many of you ammmmm, aahh first off, aahmmm other languages, so amm, is ammm, that aaahh, ammm, and that's compiled uhm.
@supergopi I feel kinda silly going overboard. I got very annoyed. I like watching programming videos, but I felt it got sabotaged and made unwatchable by too much uhming, so I got disappointed.
Too many certainly, and a few of them are interesting to study. D is one of the best kids on the block right now and probably the best contender as a successor to C++, although it's already a "big" language in terms of features. It doesn't have the conciseness of Google Go (which seems suitable for embedded devices to me), but it's at least as powerful as C++ and more sound on most areas.
The large amout of D features was why i haven't choosen it. Maybe with Version 2 they stop language features for a decade and optimize the tool chain.
@blenderpanzi : D2 (the current version of the language) does support closures, and they can be executed from another thread. I actually used this property to implement a parallel foreach loop in a parallelism library I wrote.
@llothar68 Hm I don't remember why I asked that. Maybe I got something mixed up. Was it D that isolates the memory of threads so communication between them only can happen over certain channels? Via closures it would be possible to access things allocated and possibly still used in another thread -> concurrency.
Just bought the book. I am very optimistic about D.
gbrlgrct 1 month ago
the D programming language trumps Go at pretty much every aspect, even compilation times
jgilb100 3 months ago 3
this code may be correct, but its way too complicated.
C# and Java are the best:D!
ferquo 7 months ago
@ferquo Your opinion may be valuable but your statement is biased.
Learning a new language makes you a better programmer, 100% guaranteed.
Magnetohydrodynamics 5 months ago
The answer to the last question should have been: "Oh, I'm so sorry, I have no more books left!"
letMeSayThatInIrish 7 months ago
This comment has received too many negative votes show
can't stand this guys accent.
jmac217x 8 months ago
Typo in the title :P Programming with 2 m, Google :D
SaschaHeylik 9 months ago
I know which language I'm going to learn next... :D
Synergy9k 11 months ago 5
D is some good stuff!
slowkvant 1 year ago
Today I read a section on mixins in chapter 3 of The D Programming Language and my jaw hit the floor. If you are a C++ programmer, you definitely need to try D.
FlameHue 1 year ago 5
this is an interesting presentation, but this guy might be the most annoying presenter ever-- why is he compelled to ask everything as a question before making a statement? "foo is bar. what does bar mean?" pause for five seconds. somebody gives half-correct answer. presenter gives correct definition. repeat.
phixxx 1 year ago
I wish php was client-side + server-side, that'd be a powerful programming language with very simple code.
FearlessLT 1 year ago
Wouldn't the C hello world return 255 on failure rather than 127?
Borbuster 1 year ago
hey...this dude is romanian...gogo dude xD
enbiscuits 1 year ago
18:37 I'm sorry Andrei but if you present incorrectly written program (incorrectly in the sense that it doesn't have return statement) and your args are based on this program you are just plain wrong. Add there return statement + try,catch and this program will behave correctly.
TheKMKY 1 year ago
@TheKMKY "incorrectly in the sense that it doesn't have return statement"
A return statement is not required in C++. Even Stroustrup writes Hello World this way.
vinkhe 1 year ago
@vinkhe Return statement IS REQUIRED. Check ISO standard for C++03
TheKMKY 1 year ago
This has been flagged as spam show
@TheKMKY "Return statement IS REQUIRED. Check ISO standard for C++03"
Quoting from ISO/IEC 14882:2003, "If control reaches the end
of main without encountering a return statement, the effect is that of executing
return 0;". So you are wrong, and Andrei and Stroustrup were right.
vinkhe 1 year ago
@TheKMKY
Excerpt from chapter "3.6.1 Main function" of the C++ standard:
"A return statement in main has the effect of leaving the main function (destroying any objects with automatic
storage duration) and calling exit with the return value as the argument. If control reaches the end
of main without encountering a return statement, the effect is that of executing
return 0;"
antred11 8 months ago
TALK TO MEEEE!
armd86 1 year ago
"It's the fastest language to compile of all that they know"... or something like that. Do they know about Go?
FetrovskyGoogle 1 year ago
Comment removed
TheCyberShadow 1 year ago
Comment removed
TheCyberShadow 1 year ago
Comment removed
TheCyberShadow 1 year ago
Comment removed
TheCyberShadow 1 year ago
@FetrovskyGoogle Yes, it compiles faster than Go too, by a huge margin. Obviously Andrei didn't want to say that straight in the face of a room full of Google employees :)
TheCyberShadow 1 year ago
@FetrovskyGoogle At 1:02:05 Andrei says that D compiles 4.5 times faster than Go.
TheCyberShadow 1 year ago
@TheCyberShadow Thank you, I actually heard it, but it was long after I posted my comment :)... it's ridiculous how long it takes to build a C++ or a Java project.
FetrovskyGoogle 1 year ago
the D and Go people should pool their efforts, merge the two and call it 'The GoD Programming Language'
yudlejoza 1 year ago 65
@yudlejoza D and Go are very different. D is based on C++, and Go is based on C. D is intended to be C++ with better OOP. Go is intended to be C with useful, builtin concurrency. And that's just the simple explanation =P
Ginto8 1 year ago 7
@yudlejoza *Very* good one!
FetrovskyGoogle 1 year ago
@yudlejoza hahahah!
slavewholave 1 year ago
@yudlejoza it sounds like exactly what it would look like :-)
ergius1988 8 months ago
@yudlejoza Sorry, that title is owned by LIST.
Magnetohydrodynamics 5 months ago
@Magnetohydrodynamics Fuck, LISP! I MEANT LISP.
Magnetohydrodynamics 5 months ago
I think if we are comparing D's correctness to C's correctness it is only fair to use C99 (which is, what, 11 years old?) and not more archaic versions :) The point about printf's failures not being reported is valid, but C hasn't returned a random value from main() in more than a decade.
QSerpent 1 year ago 3
Comment removed
rkulla 1 year ago
42:20 PROFIT!
rtsownage 1 year ago
Love the douchebag at 13:16 who can't listen (source, not headers) and has to prove himself right. It must really suck to work at Google, dealing with alpha-geeks like this all day.
SatansSpatula 1 year ago 17
@SatansSpatula they create things like wave :p
isx2007 1 year ago
@SatansSpatula Headers are source. It was a fair answer to a very open-ended question.
jsd1982 10 months ago
@SatansSpatula I think the guy at 13:16 *really* wanted that book! =)
mmtrebuchet 10 months ago
You are wrong about the return value of "main" in your C example - if main() has no explicit "return" statement then the value returned to the environment (in a hosted implementation) is *not* 13 (or something that happens to be in the right register), but is in fact 0 by definition. See C99 section 5.1.2.2.3p1.
QSerpent 1 year ago 4
Comment removed
Buffzor 1 year ago
@QSerpent That is true if your compiler is a C99 compiler. My default gcc produces Andrei's result, but add -std=c99 and yours is correct.
jbarbuc 1 year ago
@QSerpent
Was this defined for older versions of C though? I think the point was meant to be illustrative rather than literal.
asdfwqtw 1 year ago
This comment has received too many negative votes show
God-DAMNIT already ! Again with the aaahhh, uuhhhmm, uhmm, aaammm, uuuuuuu, aaaa....
What the FUCK is it with this goddamn AAAAAANNNAA, AAAA, taaahhuuuuu, uuhh, i have thisuuuu, and this bookaaahhhuuummm, sooaaa, aaahhmm, alright aaamm, aaamm, i'm sure aammm that many of you ammmmm, aahh first off, aahmmm other languages, so amm, is ammm, that aaahh, ammm, and that's compiled uhm.
a1mint 1 year ago
This comment has received too many negative votes show
Also, Python most DEFINITELY is *NOT* a "beautiful language".
a1mint 1 year ago
@a1mint I would disagree. You probably have never gotten familiar with Python before.
jcao219 1 year ago
@a1mint That's because he's not a public speaker, but a freaking amazing programmer.
mkdbl 1 year ago
@a1mint I agree about the uuhms and aahms, particularly during the first 25 minutes. I was very nervous!
zaheu 1 year ago
@zaheu That's perfectly understandable, so ignore people like him :-) Thank you for your efforts on D.
EXetoC 1 year ago
@a1mint
What a dumb arrogant person you are a1mint !?
I fully appreciate the talker for talking in his non-native tongue
to room full geeks in google ! He even shows a good sense of humor !
supergopi 1 year ago
@supergopi I feel kinda silly going overboard. I got very annoyed. I like watching programming videos, but I felt it got sabotaged and made unwatchable by too much uhming, so I got disappointed.
I do appreciate someone trying though.
a1mint 1 year ago
Everything went better than expected.
coreboy 1 year ago
how many programing languages is there wtf!
ewigkase1 1 year ago
@ewigkase1
Too many certainly, and a few of them are interesting to study. D is one of the best kids on the block right now and probably the best contender as a successor to C++, although it's already a "big" language in terms of features. It doesn't have the conciseness of Google Go (which seems suitable for embedded devices to me), but it's at least as powerful as C++ and more sound on most areas.
InXLsisDeo 1 year ago 2
@InXLsisDeo
The large amout of D features was why i haven't choosen it. Maybe with Version 2 they stop language features for a decade and optimize the tool chain.
llothar68 1 year ago
@ewigkase1 Hundreds if not thousands.
FloppyFormatFrenzy 1 year ago
Does D support closures? If yes can you execute a closure in another thread as from which the bound variables are coming from? (I guess not.)
blenderpanzi 1 year ago
@blenderpanzi : D2 (the current version of the language) does support closures, and they can be executed from another thread. I actually used this property to implement a parallel foreach loop in a parallelism library I wrote.
dsimcha 1 year ago
@blenderpanzi yes
jcao219 1 year ago
@blenderpanzi
Why should execution of a closure outside the thread be a problem.
For a closure you (or the compiler) has to break the variables from the stack anyway.
I implemented something like this for Eiffel myself, wasn't difficult at all.
llothar68 1 year ago
@llothar68 Hm I don't remember why I asked that. Maybe I got something mixed up. Was it D that isolates the memory of threads so communication between them only can happen over certain channels? Via closures it would be possible to access things allocated and possibly still used in another thread -> concurrency.
blenderpanzi 1 year ago
@blenderpanzi
No D can use shared all memory. Maybe you mean Erlang?
llothar68 1 year ago
@llothar68 Jep I think thats it.
blenderpanzi 1 year ago