Search:

Type: Posts; User: Elysia

Search: Search took 0.18 seconds.

  1. Replies
    37
    Views
    6,283

    Yes. Fine. Implementations whose name...

    Yes.


    Fine.
    Implementations whose name implies something they will not do are bad.
    Implementations that try to delete a this pointer is probably bad code.
    All I said was that it was a good...
  2. Replies
    37
    Views
    6,283

    I apparently made the mistake of taking some code...

    I apparently made the mistake of taking some code that contained two pointers while only decorating one of them (I completely forgot about the other one).
    That's why I made another example where I...
  3. Replies
    37
    Views
    6,283

    Then I don't see your point. But as you seem...

    Then I don't see your point.
    But as you seem unwilling to explain the problem further... *shrug* I'll just let it be, then.
    But I will assure you that it wasn't trolling.
  4. Replies
    37
    Views
    6,283

    No need to scare the cat so much. I looked at it...

    No need to scare the cat so much.
    I looked at it from "I don't know what QtAutoDeleter does" perspective, nevermind that I wrote it.
    The reason I say it is good is that the line implies that it...
  5. Replies
    37
    Views
    6,283

    Of course there are going to be people who do not...

    Of course there are going to be people who do not understand it. That's life.
    If I create some void foo(std::list), then there are going to be some people who do not understand what it is (List?...
  6. Replies
    37
    Views
    6,283

    Yes, I am asking for decorations because it is an...

    Yes, I am asking for decorations because it is an easy way to self decorate the interface.


    Sure, but how does it decorate the interface? This can decorate the line where you call the function,...
  7. Replies
    37
    Views
    6,283

    You know, a simple auto edit = new...

    You know, a simple

    auto edit = new QTextEdit(auto_deleter(this));

    would have been just fine to self document that line of code. Obviously auto_deleter would be defined as something like
    ...
  8. Replies
    37
    Views
    6,283

    Even reading the documentation does not make one...

    Even reading the documentation does not make one an expert. It is easy to not know where to use new and where one must delete. A self documenting interface reduces this problem.
  9. Replies
    37
    Views
    6,283

    I don't disagree with you. I'm not saying that Qt...

    I don't disagree with you. I'm not saying that Qt is built in a bad way (although looking at it from a C++11 perspective, perhaps it was; but then again, it was built before C++11, so we really can't...
  10. Replies
    37
    Views
    6,283

    I am not backpedalling. I mentioned delete what...

    I am not backpedalling.
    I mentioned delete what you new because obviously I did not know Qt does something as insane as automatically destroying objects because it isn't self documenting.
    Sure, I...
  11. Replies
    37
    Views
    6,283

    There never was any question as to whether the...

    There never was any question as to whether the information could be found easily or not.
  12. Replies
    37
    Views
    6,283

    What is your point? I know it documents the...

    What is your point? I know it documents the behaviour somewhere, but that wasn't the point.
  13. Replies
    37
    Views
    6,283

    I'm not saying it's wrong. I'm saying it's not...

    I'm not saying it's wrong. I'm saying it's not self-documenting.
    A raw pointer could mean anything:
    - Is it because a reference is not possible/practical in this case, and hence we just want a...
  14. Replies
    37
    Views
    6,283

    Of course I don't, unless the interface uses a...

    Of course I don't, unless the interface uses a smart pointer of some sort. How am I supposed to know?
  15. Replies
    37
    Views
    6,283

    You realize that you can create an object without...

    You realize that you can create an object without using new, right?
    So instead of

    QTextEdit *edit = new QTextEdit(this);
    edit->setGeometry(5, 5, 200, 150);

    You can do

    QTextEdit...
Results 1 to 15 of 15