Live data from Hacker News

Bjarne Stroustrup Quotes

stroustrup.com

131–140 of 173 posts

Re: Bjarne Stroustrup Quotes

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

See also: Text Rendering Hates You https://faultlore.com/blah/text-hates-you/ and Text Editing Hates You Too https://lord.io/text-editing-hates-you-too/

Re: Bjarne Stroustrup Quotes

#132
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.

I am a C++ programmer and if you told me those things, I would just flip a bozo bit on you and carry on coding, no religious flame-war is warranted.

Re: Bjarne Stroustrup Quotes

#133
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.

I'm not a c++ programmer. I don't see how RAII is a bad idea, or how it's "cult like" to use it. It has obvious benefits

Re: Bjarne Stroustrup Quotes

#134
post #108

Earlier quoted context omitted.

Well, we now have garbage collection. Just not tracing garbage collection.

Tracing GC is there on C++/CLI, Unreal C++, Bohem and V8's Olipan.

But not on standard C++. And C++/CLI doesn't collect garbage of native objects.

Re: Bjarne Stroustrup Quotes

#135

Earlier quoted context omitted.

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…

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…

> Obviously that makes internationalization harder, but the advantage is that strings are much simpler to reason about.

Internationalization relative to what? Anyway, just pick any language in the world, i.e. an arbitrary one—can you represent it using just ASCII? If so I would like to know what language that is. It seems that Rotokas can be.[1] That’s about 5K speakers. So you can make computer programs for them.

Of course this comment of mine isn’t ASCII-only.

[1] https://en.wikipedia.org/wiki/Rotokas_language

Re: Bjarne Stroustrup Quotes

#136

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…

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

> In the age of emoji (and uhhhh, everyone who doesn't use English as their main language)

Open a random NYT article of more than a hundred words. It won’t be in ASCII.

Re: Bjarne Stroustrup Quotes

#137
post #108

Earlier quoted context omitted.

Tracing GC is there on C++/CLI, Unreal C++, Bohem and V8's Olipan.

But not on standard C++. And C++/CLI doesn't collect garbage of native objects.

Depends on how C++/CLI was compiled, and how was that allocation done. TIMTOWTDI

The biggest issue with current ISO C++ is that the standard desigs some features on paper, instead of adopting existing extensions as standard features, as it used to be.

Hence when paper designed features get wrongly designed, no one picks them up.

Re: Bjarne Stroustrup Quotes

#138
> "There are only two kinds of languages: the ones people complain about and the ones nobody uses". Yes. Again, I very much doubt that the sentiment is original. Of course, all "there are only two" quotes have to be taken with a grain of salt.

True for many things. There are only two kinds of companies: the ones people complain about and the ones with no market power.

Re: Bjarne Stroustrup Quotes

#139
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?

If basketball is so hard, then how did Michael Jordan score so many points?

Re: Bjarne Stroustrup Quotes

#140

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.

You might be referring to this, which I think is even more accurate. Dave Herman quotes him:

https://www.thefeedbackloop.xyz/stroustrups-rule-and-layerin...

One of my favorite insights about syntax design appeared in a retrospective on C++ by Bjarne Stroustrup:

For new features, people insist on LOUD explicit syntax.

For established features, people want terse notation.

I call this Stroustrup's Rule. Part of what I love about his observation is that it acknowledges that design takes place over time, and that the audience it addresses evolves. Software is for people and people grow.

Side note: Dave Herman is Rust's most unrecognized contributor: https://brson.github.io/2021/05/02/rusts-most-unrecognized-c...

I often notice that the actual Rust authors and designers respect and are influenced by C++ very much. (Niko M is another C++ fan)

It's only the randoms online that like to start C++ vs. Rust arguments.

Another thing to note is that the Mozilla Rust is MUCH closer to C++ than Graydon's Rust was. Graydon's Rust was not at all about zero-cost abstraction, the shared motto of C++ and Rust.

Post reply on HN