Coder Social home page Coder Social logo

Comments (5)

dingmaotu avatar dingmaotu commented on June 16, 2024

The exact behavior of this method should be checking for owning status and delete the element if necessary. If T is not a pointer, it is not necessary. But for the Vector case, what I was thinking is that if I can pass a pointer to the container, then I at least have a reference of the object and if I want to remove it from the container then I may not want to invalidate my reference at the same time. So the behavior here is not standard but it is reasonable. I don't know how to reconcile this obvious conflict. Do you have any idea?

from mql4-lib.

yerden avatar yerden commented on June 16, 2024

If Collection class has public m_owned flag then we have to support it in every inherited implementation. Thus, if m_owned is set, Vector implementation MUST destroy the element which is thrown out of it. Otherwise, there's no point in having m_owned flag in the first place. So must do every other derived class. So I don't think I get your point here ๐Ÿ˜‰

Globally, I think that the library must have consistent, non-contradictory API throughout all the code base. Ideally, all these caveats must be documented, or at least (which is more important) all derived classes must display the same behaviour hinted by their ancestors.

from mql4-lib.

dingmaotu avatar dingmaotu commented on June 16, 2024

OK, I think you are right. I will fix the inconsistency ASAP.

from mql4-lib.

yerden avatar yerden commented on June 16, 2024

Hi, any success? I'd be glad if you process the PR backlog out there ๐Ÿ˜„

from mql4-lib.

dingmaotu avatar dingmaotu commented on June 16, 2024

Not yet. Sorry for the slow response to your PR. I am extremely busy since I changed my job... I will try to process your PRs tonight. Thanks for your contribution.

from mql4-lib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.