Some national standards bodies, entitled to do so, might claim they can sell you one when actually they've got a deal with a relatively local print-on-demand company, but because this standard is huge that company will reject the order so you in fact can't buy the product you'll get an apology, or a PDF or both despite specifically buying paper.
Although their processes are hopelessly antiquated (fly to Hawaii to fix a typo? I don't think so), the result is, as you might expect in 2023 - just a bunch of document layout source, from which "draft" versions of the document are publicly available.
Not as useful if you're getting burgled, or to raise a display off the desk, but more practical for real work.
For CHF 208, you can buy the reference directly from ISO...all 1,853 pages! [0]
ECMA-335 (the Common Language Infrastructure portions): https://www.ecma-international.org/publications-and-standard..., 574 pages
Just sayin'
Both offers had their prices, erm, fixed.
(But regardless, that sounds like a toxic environment and I’m glad you’re out of there. To think that because someone has a degree in biology, that automatically precludes them from knowing anything about computers or programming that you don’t is just the epitome of arrogance and hubris.)
The thing was so obscure that even seasoned people who have worked with this for many years didn't know about that; and yes, I added little bit of "be humble because you never know what you don't know".
Then he carried a grudge.
> If you want automatic garbage collection, there are good commercial and public-domain garbage collectors for C++. For applications where garbage collection is suitable, C++ is an excellent garbage collected language with a performance that compares favorably with other garbage collected languages. See The C++ Programming Language for a discussion of automatic garbage collection in C++. See also, Hans-J. Boehm's site for C and C++ garbage collection.
> Also, C++ supports programming techniques that allows memory management to be safe and implicit without a garbage collector. I consider garbage collection a last choice and an imperfect way of handling for resource management. That does not mean that it is never useful, just hat there are better approaches in many situations.
> C++11 offers a GC ABI.
https://www.stroustrup.com/bs_faq.html#garbage-collection
It seems few remember the days when Java put so much pressure on C++ that Bjarne S was very much trying to find a way to provide GC for those who wanted it. In 2023, the folks wanting GC are all using those languages, and it's assumed C++ is anti-GC.
And judging by the fact that this is currently the top comment, I guess this is what other people come to HN (now) to read in the comments. Color me confused.
Did you read it? It's about GC in C++ being a relative obscure feature that is now going to be removed.
>some pedantic argument you made 4 years ago
I just shared an anecdote related to it and I thought it'd be appropriate bc. this is/was quite likely the only chance I'd have in my life to talk about this very very very specific situation with people that would understand it. And yes, it's getting a few upvotes, weird thing to be mad at but to each its own.
GC isn't the first one to victim of such lack of implementations, only EDG implemented C++98 external templates, for example.
What these features do, which are being removed, is make it easier to implement a GC allocator in a standard conforming and portable fashion. Current GCs in C++, such as Boehm's GC, depend on platform specific hacks that are incredibly brittle.
As it turns out, these features do not make it easier to actually implement a GC allocator in C++, so they are being removed.
I think most people can differentiate between a language providing a feature as a first class native property, and a library or feature built on top of that language. Most people would not argue against the position that C++ does not contain a web browser as a feature, even though it's possible to build a web browser using C++.
Similarly, C++ does not and has never had garbage collection, but for a time the standard did provide facilities that was supposed to make it easier to implement a garbage collection library.
Reading comments (loosely-related, tangential, meta, whatever) that generate potentially interesting discussion? That's pretty much the only reason I've visited HN for years and years. What do you mean "now"?
- know exactly what you mean by "C++ has support for garbage collection"
- have the chapter-and-verse citations from ISO C++ ready if someone disagrees
- understand the limitations of what is required in the document, and be the first to point that out
- and have a good idea of some of the landscape in terms of what of those requirements is implemented in the wild
I do not say this as someone who believes this represents healthy behavior or that wants to write C++ for a living. They've been like this since #C on EFNet and FreeNode were a thing 30+/25+ years ago. My guess is they got the behavior from Usenet or something but I didn't hang out there so I don't know first-hand.
Been there many times. Including when a room full of programmers laughed at me for suggesting randomizing a list prior to using quick sort because "it messes up the big Oh complexity"
(Yes yes I know there are simpler ways to handle quick sort attacks but that wasn't why they were laughing)
I am not able read that into the anecdote presented in the original comment.
"My background is Biology so there were a few remarks about how "a biologist just doesn't know these things, lol""
There are so many arguments that I could have won, if I had just had an evening to mull it over.
I'm reminded of the movie Annie Hall where Woody Allen is waiting in line...
Alvy: [Hearing a man behind him rambling about Marshall McLuhan]
What I wouldn't give for a large sock with horse manure in it.
[Turns to the camera] What do you do when you get stuck in a
movie line with a guy like this behind you? It's just...maddening-
Man in Theatre Line: [Notices Alvy and walks up to him] Wait a minute,
why can't I give my opinion? It's a free country!
Alvy: Did-did he, he can give you- Do you have give it so loud? I
mean, aren't you ashamed to pontificate like that? And the
funny part of it is, Marshall McLuhan; you don't know anything
about Marshall McLuhan!
Man in Theatre Line: Oh really, really? I happen to teach a class at
Columbia called "TV, Media, and Culture." So I think that my
insights into Mr. McLuhan, well, have a great deal of validity!
Alvy: Oh, do ya? Well, that's funny, because I happen to have Mr. McLuhan
right here, so, so, yeah, just lemme lemme lemme — [pulls McLuhan
from behind a nearby poster stand] — Come over here for a second.
Tell him!
Marshall McLuhan: I heard what you were saying. You know nothing of my
work. You mean my whole fallacy is wrong. How you ever got to
teach a course in anything is totally amazing.
Alvy: [To the camera] Boy, if life were only like this!Why "thankfully"?
but see also 50+ years of back and forth on that subject, other opinions available.
both are terrible mess to debug, yet we aren't calling out ppl using (or even abusing) OOP
Hahaha, how can that guy be so stupid as to think the world isn't flat? Easy to see in hindsight, but it happens with everything (programming language a vs b, OS A vs B, etc).
Groupthink is strong and even the people who agree with you might find themselves not pointing it out.
"I understand what you are trying to say and I think you are wrong" at a conf to delighted razzes and jeers from the room. Bjarne had seemingly just discovered that link lists thrash cache and was presenting about swapping in a vector instead. Note it's got nothing to do with whether this guy is onto something or not. It is possible to disagree without being an asshole. Bjarne missed the opportunity. C++ culture follows.
https://youtu.be/SfkMiGFVhZo?si=pd36kbm9FFoKFuKm&t=4111
IMHO it is unsurprising there's a lot of groupthink involved in such a culture and it has really damaged the language and certainly makes it unpleasant in the way you describe.
Ultimately, we write programs to make machines do things. What we write exactly determines what the machine does. It is our responsibility to understand what we write makes the machine do; otherwise it won't do what we wanted. Often (maybe almost always nowadays) the performance details don't matter much. When they do matter, there is no substitute for understanding.
The Standard data structures are constructed simply, with understandable performance characteristics, imposing minimal overhead both in time and code space. This is an extremely important quality not to sacrifice idly. No one is obliged to use only the Standard containers; if you need something different, you can write something different yourself, or even find it online somewhere. You are encouraged to write something yourself, and maybe publish it. People do.
In a very real sense, the Standard containers are just examples. Making them unnecessarily complicated would make them worse examples, and would make them worse for almost all places they are used.
Maybe it's why there have been so many terrible decisions in C++ over the years because being an asshole and right might scare off discussion but it doesn't make even Bjarne infallible.
[1] If you care about performance you take full responsibility for all code used including all libraries like the stl, which might well mean you don't use the stl and vector and write something optimised for your purpose, not every possible purpose. But I don't want to be an ass about saying it.
The giveaway is the hoots and razzes from the crowd. No word above needed saying. It clarified nothing. It is pure assholery. (And he may not have even intended it. Clearly lots of c++ people have no issue with just how unpleasant community interaction is compsred other communities. It's also pretty obvious that many do see it plainly).
To me it sounded more like a reaction to Bjarne phrasing himself in an unexpected way, much like you'd laugh at a joke. But I regardless do agree that it's inappropriate to laugh at a sincere question. And as an extension to that, it would have been better if Bjarne's first sentence wasn't phrased as a joke.
But I don't think there's any issue with plainly stating that you think the asker is wrong, or with the rest of Bjarne's response. Of course, I'm not a native speaker.
I completely agree with that.
People with some limited amount of knowledge will quickly tell you that you are wrong, but it is them who are wrong. Many don't even give you the little benefit of the doubt to do a small internet search, and yeah the problem is worse when you are an "outsider" in some sense.
Being technically right for an aspect that doesn't matter is a common trope that a lot of software engineers fall for.
They were like "if you knew the least bit a about C++, you'd knew it doesn't have a GC".
I was like, "yeah cool, but it does have some GC functionality", but they just shut me down. My background is biology so there were a few remarks about how "a biologist just doesn't know these things, lol".
This was around 2019, btw. And sure, I'm a biologist, but I also happen to have spent 8-10 hours/week for the past 20 years coding because I just really like it; so, there's my 10k hours, ¯\_(ツ)_/¯.
I'm SO glad I'm out of that place.