Live data from Hacker News

Bjarne Stroustrup Quotes

stroustrup.com

81–90 of 173 posts

Re: Bjarne Stroustrup Quotes

#81

Earlier quoted context omitted.

> this design makes the common case much simpler at the expense of making the rare case harder In the age of emoji (and uhhhh, everyone who doesn't use English as their main language), I don't think your "rare case" is really that rare.

There must be statistics around how much of the data in the world is or could be Latin-1. I'm going to guess it's a very high percentage.

wat?

Counting webpages (not bytes) the number is near 50% are English only and 50% are other languages.

Only 20% of people worldwide speak English.

I know other languages can fit inside ASCII but, really?

Re: Bjarne Stroustrup Quotes

#82

Earlier quoted context omitted.

I don't find it at all insightful or humorous. (I hope you don't think it's genuine)

> 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…

Oh absolutely not an absolute, but there are qualities that make or break good humour.

On the footgun side, I dunno. It probably widened and/or deepened. If you read e.g. Effective C++ and turned on all warnings you were much better off than in plain C. OTOH of course it's a more complex language.

A lot of the early criticism of C++ was directed at the OO features, which have fallen well out of favour.

Re: Bjarne Stroustrup Quotes

#84
post #71

Earlier quoted context omitted.

Code points are not bytes.

Sure, but if you're insisting that the string be represented as one byte per character, you end up with the exact same properties with "array of code points" and "array of bytes"

Sort-of, but no, because code points are not characters.

There's a big difference between "get the 5th code point" and "get the 5th character".

Because multiple code points can be used in a single character, it not possible to do random-character-access in a unicode-encoded string.

Re: Bjarne Stroustrup Quotes

#85
I don't remember the exact quote, but I saw a talk where he said something like "People want big/verbose/explicit syntax for the languages features they don't understand, and small/terse/implicit syntax for the language features do understand." It made me realize that many of my language design opinions at that time were a matter of personal preference.

Re: Bjarne Stroustrup Quotes

#86
post #21
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…

Languages have trends too. Weak typing/Implicit conversion was cool in the 90s. JS and PHP would have magnitudes better if they were typed like Python, but that's history.

There are definitely trends, but the pattern I see with early JS and PHP is they simply didn't anticipate the consequences of certain decisions.

What happens is you make a decision "locally", for some use case or program. And then you don't realize how it affects other programs.

The well known "Wat" talk about JS by Gary B. is basically a bunch of these unintended consequences.

So the problem is really to see the whole picture, and to get some experience using the language. But there's that catch 22 -- by the time you release it, it's almost set in stone.

I remember in the early 2000's Guido and the Python team would always refer to "Python 3000" -- the one chance they had to break things!

Re: Bjarne Stroustrup Quotes

#87
post #15

Earlier quoted context omitted.

actually, i reckon that most, if any, c programs will not compile with c++, without at least some (possibly not difficult) modifications

My only qualms is the number of genuine C only compilers in use, vs number of embedded system companies/projects/codebases in the world. The subset of C features that are incompatible with C++ is quite small, and most of the features are a little out of the way IMO. Of the regular suspects (GCC, MSVC, Clang), your C codebase is probably entirely compatible with C++ as each of these has varying levels of compliance wi…

> Of the regular suspects (GCC, MSVC, Clang), your C codebase is probably entirely compatible with C++ as each of these has varying levels of compliance with the C and C++ standard.

yep, leave it up to the technical crowd to try and split hairs too fine.

Re: Bjarne Stroustrup Quotes

#88
post #7
post #6

Earlier quoted context omitted.

Yeah mine too until Rust. But part of that sensibleness was making it backwards compatible with C, which entails a mountain of inherited design mistakes. I wonder what his blank slate language would have looked like.

C++ is not backwards compatible with C. It’s mostly compatible, but it’s not completely compatible like say Objective C which is a strict superset of C.

> C++ is not backwards compatible with C.

Yeah, it is really ironic. C++ got all the warts of C to be compatible with it and then C++ had lost its compatibility with C but not warts.

Re: Bjarne Stroustrup Quotes

#89
post #7

Earlier quoted context omitted.

C++ is not backwards compatible with C. It’s mostly compatible, but it’s not completely compatible like say Objective C which is a strict superset of C.

They have diverged slightly in the years since C++ was introduced. But at the time the incompatibilities were extremely small. Even today they are pretty small and GCC/Clang will happily compile C constructs (e.g. designated initialisers, VLAs) with just a warning. Actually you need `-Wpedantic` to even get a warning for both of those. (And `-std=c++17` since designated initialisers are actually in C++20.)

...at least as long as you don't go anywhere near the atomic mess.

Re: Bjarne Stroustrup Quotes

#90
post #72

"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++.

I think you would have a very hard time defending the claim that 'nobody uses Rust,' given its current adoption trend in major technology companies like Microsoft and its integration in software projects like the Linux kernel.

[deleted]
Post reply on HN