Live data from Hacker News

Bjarne Stroustrup Quotes

stroustrup.com

121–130 of 173 posts

Re: Bjarne Stroustrup Quotes

#121
post #109

Earlier quoted context omitted.

Thanks for your response. Personally I fall into the "strings are arrays of bytes" camp (which is also shared by Go). A difference between my view and that of the Go designers is that I don't feel that it is important to support Unicode by default and am perfectly happy to assume that every character corresponds to a single byte. Obviously that makes internationalization harder, but the advantage is that strings are…

Out of interest, would you also say that "images are arrays of bytes"? If not, what's the semantic difference? For me, strings represent text , which is fundamentally linked to language (and all of its weird vagueness and edge-cases). I feel like there's a "Fallacies programmers believe about text" that should exist somewhere, containing items like "text has a defined length" and "two identical pieces of text mean th…

> I feel like there's a "Fallacies programmers believe about text" that should exist somewhere

I got you covered.

https://github.com/kdeldycke/awesome-falsehood#international...

http://garbled.benhamill.com/2017/04/18/falsehoods-programme...

https://jeremyhussell.blogspot.com/2017/11/falsehoods-progra...

https://wiesmann.codiferes.net/wordpress/archives/30296

I love when the writing gets visibly more unhinged and frustrated with each invalidated assumption. It's like the person's mind is desperately trying to find some small sliver of truth to hold onto but it can't because the rug is getting constantly pulled out from under it.

Re: Bjarne Stroustrup Quotes

#122

"There are only two kinds of languages: the ones people complain about and the ones nobody uses". He is right on this one. Pretty much in every discussion about Programming Languages people write how good Rust is and complain about how bad C++ is but the reality is, C++ it's one of the most used languages in the world. This quote could be a very harsh reply to Rust vs C++.

Ecosystem effect.

Re: Bjarne Stroustrup Quotes

#124
post #9

Language design is a curious mixture of grand ideas and fiddly details I hadn't heard this last one before, but it's SO right ... I always wondered why JS and PHP and Perl got so many details "wrong" (e.g. with Perl, one definition of "wrong" is that Perl 6 / Raku didn't make the same design choice) Turns out there's an avalanche of details, and they interact in many ways! Python did better, but I strongly argue both…

If lang design is so insanely hard, then how C# designers get so many things right?

Re: Bjarne Stroustrup Quotes

#125
post #9

Language design is a curious mixture of grand ideas and fiddly details I hadn't heard this last one before, but it's SO right ... I always wondered why JS and PHP and Perl got so many details "wrong" (e.g. with Perl, one definition of "wrong" is that Perl 6 / Raku didn't make the same design choice) Turns out there's an avalanche of details, and they interact in many ways! Python did better, but I strongly argue both…

If lang design is so insanely hard, then how C# designers get so many things right?

I haven't used C# enough to comment on the language itself, but I do know it was designed (at least initially) by Anders Hejlsberg who is very experienced in language design.

Re: Bjarne Stroustrup Quotes

#126
post #109

Earlier quoted context omitted.

Out of interest, would you also say that "images are arrays of bytes"? If not, what's the semantic difference? For me, strings represent text , which is fundamentally linked to language (and all of its weird vagueness and edge-cases). I feel like there's a "Fallacies programmers believe about text" that should exist somewhere, containing items like "text has a defined length" and "two identical pieces of text mean th…

> I feel like there's a "Fallacies programmers believe about text" that should exist somewhere I got you covered. https://github.com/kdeldycke/awesome-falsehood#international... http://garbled.benhamill.com/2017/04/18/falsehoods-programme... https://jeremyhussell.blogspot.com/2017/11/falsehoods-progra... https://wiesmann.codiferes.net/wordpress/archives/30296 I love when the writing gets visibly more unhinged and fru…

Amazing, thanks. Bookmarking the lot.

Re: Bjarne Stroustrup Quotes

#127
post #78

Earlier quoted context omitted.

> I don't find it at all insightful or humorous. Humor isn't an absolute. I find it funny because if Stroustrup had tried he probably couldn't have made a language with more footguns, there are so many things in there that require a lot of discipline not to use (or overuse). At the same time it was a supremely useful language that allowed for much better abstraction than C ever did but it definitely came with a price…

> not real? real genuine Eric S Raymond humor, yes.

I've been a C++ user since 'cfront' and he simply has a point. If Stroustrup had been a little bit more disciplined about what features to add and which to leave out C++ would have been much more manageable. I'm not really afraid of many things but legacy C++ codebases I try very hard to stay away from. With some luck the original author(s) went overboard with all of the stuff that's available and never got around to refactoring any of it.

Re: Bjarne Stroustrup Quotes

#128

Earlier quoted context omitted.

Can you explain how you think strings should work?

I think the main alternative design is to treat strings like in Rust or Go. The problem with the “array of code points” idea is that you end up with the most general implementation, which is a UTF-32 string, and then you end up with the fastest implementation, which is a UTF-8 string, and maybe throw in UCS-2 for good measure. These all have the same asymptotic performance characteristics, but allow ASCII strings (wh…

Rust and Go string implementations are very different.

Rust strings are safe, have rich API and prevent you from corrupting their contents unless you go out of your way to do so. Go strings are a joke and won't do any validation if you slice them incorrectly and are extremely bare bones.

Re: Bjarne Stroustrup Quotes

#129
post #102

“The problem with many professors is that their previous occupation was student” This one is one of the more impactful on our industry in my opinion. I have a “side gig” as an external examiner, which means that every half year I get to sit through examinations on topics that I know most of the students will never ever have to use. And that’s the best case for much of it, the worst case is all the stuff they’re going…

>And that’s the best case for much of it, the worst case is all the stuff they’re going to need to unlearn to actually become good programmers in a world where much of the academic programming that is taught today is the same I learned more than 20 years ago.

Not commenting on the general picture of "student to professor without any industrial experience in the middle", just this point.

At some point, you have to acquire the basics. Learning to articulate thoughts into algorithms is something to be acquired at some point to work in CS, and this just didn’t change over the last 20 years. That’s the whole point of Knuth’s (M)MIX actually.

Just like learning to use alphabet won’t be enough to write every prose you will ever need, but alphabets don’t change every six months.

Re: Bjarne Stroustrup Quotes

#130
post #91

“C++ is a language, not a religion.” I swear Stroustrup said this at the beginning of his EE380 (CS Colloquium) talk at Stanford around 1986. At the time we (grad students) were all C programmers and we were sure that C was the best language evar, at least, better than Pascal, which was the language Stanford used for teaching back then. So we all wanted to see this person who had the temerity to claim that he had imp…

I disagree so, so strongly with this. C++ programmers are one of the most religious groups around, eclipsed only recently by the rust community.

Try telling a C++ programmer RAII is not a good idea. I dare you. Or smart-pointers. Or that the STL is mostly-garbage..

Trying to honestly have these conversations is typically an exercise in starting a religious flame-war.

Post reply on HN