Hacker News new | ask | show | jobs
by CyberDildonics 14 days ago
First, tone it down a little please,

I think it's time for you to shut up

you fantasized it

your lack of capacity to grok the context of the issue

Now we're firmly into the insults phase. You can just admit that you don't know about something or that you don't have evidence, or you can ask questions, but resorting to insults instead of just saying "I don't know" or "I haven't considered that" or "I'm fine with what I'm using so I haven't worried about what other people are doing" is unfortunate.

you've misunderstood the part about a "Sleep"

I repeated what was in the comments. This is another example of claims without evidence, you realize that right? You didn't explain it and how I was wrong, you just said "no, nu uh".

3 seconds of build time

Are you talking about build times now? What happened to all the stuff about being terrible for the APIs and so toxic for the whole system that you can't write anything in godbolt?

how you haven't managed to stop talking down on me

Now it's time to play both sides and fling insults but pretend that me asking for evidence is talking down to you.

I've explained multiple times why I think it does. If you want a destructor declared in C++, you have to give the full class definition.

Finally an explanation of some sort. Too bad this isn't true. Do you know that the implementation can be in a compilation unit just like C?

you are providing zero evidence for your baseless (even counter-factual) accusations towards myself. What you say makes ZERO sense.

You believe things without evidence and you have said where they come from. Then when asked for evidence you grasp at anything from insults to completely unrelated things like a single program that you like which demonstrates nothing. Those are the actual facts.

1 comments

> Now we're firmly into the insults phase.

We have been from about your 2nd comment on.

> "I haven't considered that"

Considered WHAT?

> I repeated what was in the comments. This is another example of claims without evidence, you realize that right? You didn't explain it and how I was wrong, you just said "no, nu uh".

I was merely giving you a second chance to notice by yourself that the Sleep-Code in question is code that is being debugged, not part of this project. But instead of double checking, again you've been relentlessly continuing on your trajectory.

You've ended up furthering your wild accusations without entertaining the possibility that I might be not completely wrong on all fronts, and you might be only half right (or less).

> Are you talking about build times now? What happened to all the stuff about being terrible for the APIs and so toxic for the whole system that you can't write anything in godbolt?

It's one of the topics, one of the manifestations of the systemic issues I was talking about, if you had paid any sort of attention.

> Finally an explanation of some sort. Too bad this isn't true. Do you know that the implementation can be in a compilation unit just like C?

You are still not understanding? I gathered you seem to be a game developer of some sorts but you don't understand the simplest basic facts about C++?

Please show me how you can call a destructor in C++ without seeing the declaration of the destructor. (I mean calling it directly of course, since calling it indirectly would refute your claim that a destructor is needed -- since you can't have an arbitrary intermediate function called automatically by RAII).

Or show me how you can see the declaration of the destructor without seeing the definition of the class.

JUST DO IT. SHOW THE EVIDENCE. DONT TALK.

We have been from about your 2nd comment on.

Nope, if you think forming beliefs from youtubers is so negative, don't do it.

It's one of the topics, one of the manifestations of the systemic issues I was talking about, if you had paid any sort of attention.

Nope, destructors have nothing to do with this and this was never something you mentioned before. If it was you could show it with godbolt.

You are still not understanding? I gathered you seem to be a game developer of some sorts but you don't understand the simplest basic facts about C++?

Show me. They are just functions, usually one or two lines.

Please show me how you can call a destructor in C++ without seeing the declaration of the destructor.

You have declarations of functions the same as in C, did you try this?

JUST DO IT. SHOW THE EVIDENCE. DONT TALK.

Show me what you're talking about in godbolt.

> Nope, destructors have nothing to do with this and this was never something you mentioned before. If it was you could show it with godbolt.

How about you simply Ctrl+F for "build time" or "compile time" and admit you have been lying, have been extremely adversarial, and have been incredibly lazy?

> Show me. They are just functions, usually one or two lines.

Isn't it strange that I'm now creating a godbolt containing absolute C++ basics as a youtuber personality fangirl, since apparently I'm only repeating stuff I don't understand, which has to be why I can't express myself and provide evidence?

It is beyond me how you don't seem to know what I'm talking about, but here you go... This should provide reasonable evidence of the lack of ergonomics when using C++, and how problematic this class stuff is from various technical standpoints.

As you mentioned, in C style programming, we could instead simply forward declare a struct, than forward declare some functions. One line for each. Good header hygiene. Clean. Done. But noo, this is C++ and we can't have straightforward code and low coupling.

Full link: https://godbolt.org/#z:OYLghAFBqd5QCxAYwPYBMCmBRdBLAF1QCcAaP...

How about you simply Ctrl+F for "build time" or "compile time" and admit you have been lying, have been extremely adversarial, and have been incredibly lazy?

More insults but there is no difference here.

I looked at your godbolt link, which part of this does C avoid? Is your whole argument here that you have to define a class' data even though you have to do the same thing in C?

Is it your argument against an optional feature seriously that you can't use the PIMPL pattern from the 90s ? Holy mother of god, that's what is so important? Every struct and class definition you have ever written compiles in a fraction of a second on hardware from 15 years ago this makes no sense at all. It even took you an entire novel of "nu uh" and "this program was written in C so everything else is bad" to get there.

What happened to all the toxic program destroying architecture effects? Now it boils down to something that is no different but without it all the same memory bugs persist.

> More insults but there is no difference here.

Rebutting your wild and easily disproved claims where it's necessary.

> I looked at your godbolt link, which part of this does C avoid?

Should I spell it out again for you? With non-class programming, you can do

    struct Foo;
    struct Bar;
    Bar *bar_create();
    void bar_destroy(Bar *bar);
    void foo_doThing(Foo *foo);
    Foo *foo_create(int x, int y, Bar *bar);
    void foo_destroy(Foo *foo);
And that's literally the API, clean and readable. Now granted, it doesn't do RAII, but here's the essence of the API, in a form that you can actually improve and develop and refactor, and which doesn't require you to rebuild the world if you changed something in a remote corner of the codebase.

This is super well known common lore, and if you haven't noticed this yourself and haven't heard many people talking about this, you simply don't know what you're talking about.

> Every struct and class definition you have ever written compiles in a fraction of a second on hardware from 15 years ago this makes no sense at all.

I'm not repeating once again how this requires you to include the world for the smallest thing which is extremely painful.

> Is it your argument against an optional feature seriously that you can't use the PIMPL pattern from the 90s ? Holy mother of god, that's what is so important? Every struct and class definition you have ever written compiles in a fraction of a second on hardware from 15 years ago this makes no sense at all. It even took you an entire novel of "nu uh" and "this program was written in C so everything else is bad" to get there.

This is not about single-build times (which are much more affected by by template metaprogramming), but about quadratic incremental rebuild scaling. And "in a fraction of a second" is a ridiculous argument when it's well known that C++ single build times are spectacularly bad and developers have to wait way too much for clean rebuilds too.

You just don't get it. And no, you don't do PIMPL. It doesn't scale at all. It's realistic to PIMPL a plain struct once in a while, but NOT with C++ classes with methods etc on a regular basis. It's not ergonomic to do so, it requires even much more boilerplate to do the simplest thing, and it makes it incredibly hard to change and fix and evolve anything. Plus, PIMPL does add a runtime indirection btw. It's BAD.

Again, I know what I'm talking down not because I'm repeating what "my heroes" said but because I've actually tried to make it work, many times. It doesn't work. And you're not doing PIMPL either. Want to know how I know? BECAUSE IT DOESN'T WORK AND YOU ARE JUST TALKING.

> Now it boils down to something that is no different but without it all the same memory bugs persist.

You can't be serious. Now you claim that's the only thing I said? No, I've said many other things. You're a loudmouth who doesn't understand the most basic thing, so we have to spend days before you accept the tiniest straightforward common sense argument that you could just google. Do you want to go down the next rabbit hole? Because I don't, I'm so done with you.

  Bar *bar_create();
  void bar_destroy(Bar *bar);
Now you have a destructor, you just have to remember to run it when the pointer goes out of scope. If you have early returns, error handling gotos, better remember to put in all the right places and none of the wrong places. At least in this scenario you know you own the memory. If you aren't making and destroying the data structure pointer and you just get it from a function or another data structure what now? Do you destroy it or is it just a reference? What function do you use? Time to check the header file and the documentation, hopefully that exists.

Not only that, but you have a pointer to the structure instead of it living on the heap. Now you have unnecessary indirection, allocation and pointer chasing when in C++ you could just treat it like a value. If you have a heap allocation in there you are now hopping from one pointer for the struct allocation to another pointer for the actual data allocation.

With your API you created an object with none of the huge advantages of being able to treat it like every other value in modern C++.

Everyone figured out how fragile this was since it started 50 years ago. Decades ago people worked out that the same problems happened constantly and came up with solutions which brought us (most of us) to where we are now.

This is not about single-build times

Now it's not about build times? I thought it was and you had said that all along? Now the story changes again.

I'm not repeating once again how this requires you to include the world for the smallest thing which is extremely painful.

Nope. You only need a class definition. Definitions don't take up any compilation time.

And "in a fraction of a second" is a ridiculous argument when it's well known that C++ single build times are spectacularly bad and developers have to wait way too much for clean rebuilds too.

People don't get themselves into bad build times because of simple class definitions. All 6MB of sqlite compiles in a single second. When people have C++ build time problems it's because of templates.

you don't do PIMPL.

I never said I did, I avoid it because that's basically what you are doing here.

Plus, PIMPL does add a runtime indirection btw

You added one already. PIMPL is the same as your indirection from heap allocating a predeclared struct so that you can return it from your constructor. The price is heap allocation and indirection.

I've said many other things.

You have, not all of them on topic.

You're a loudmouth

This is text.