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…
Bjarne Stroustrup Quotes
131–140 of 173 posts
Re: Bjarne Stroustrup Quotes
#132“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.
Re: Bjarne Stroustrup Quotes
#133“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.
Re: Bjarne Stroustrup Quotes
#134Re: Bjarne Stroustrup Quotes
#135Earlier 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…
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.
Re: Bjarne Stroustrup Quotes
#136Earlier 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.
Open a random NYT article of more than a hundred words. It won’t be in ASCII.
Re: Bjarne Stroustrup Quotes
#137Earlier 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.
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
#138True 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
#139Language 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
#140I 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.
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.