Coder Social home page Coder Social logo

Comments (8)

HDembinski avatar HDembinski commented on May 25, 2024

We need to set some rules and then follow them consistently.

  1. Classes and functions should go by the same names.

  2. Pure accessor methods can be properties, like .rank and .size. Methods which actually compute something should stay methods, even if they do not accept arguments (currently). As you said, it is more future-proof to use methods.

  3. and 4. "Settable methods", are there any? I don't like .content for indexed and I don't like a Python version of indexed.

from boost-histogram.

HDembinski avatar HDembinski commented on May 25, 2024

Boost-Histogram is not ready for a release, if by release you mean a version that is a fixed interface that we are not going to change in future versions. I have a couple of issues with the current interface of Boost-Histogram and those need to resolved before a release.

from boost-histogram.

henryiii avatar henryiii commented on May 25, 2024

By release, I mean an alpha version on PyPI that people can more easily test. It would come with alpha-status warnigns but we will need to get further testing from groups interested in trying boost-histogram. But we will try to provide a reasonably stable interface if possible - don't worry too much by the "few days", it might be 1-3 weeks, and that would be okay.

from boost-histogram.

HDembinski avatar HDembinski commented on May 25, 2024

Ok, but there can be no release before we settle the open issues regarding the interface.

from boost-histogram.

HDembinski avatar HDembinski commented on May 25, 2024

I think we can close this with the compromise:

Free functions in boost::histogram are also free functions here, and in addition there are methods with the same name attached to the histogram class. This way there is some interface bloat, but numpy is doing something similar so it is not all that surprising.

I understand that methods are useful for people who use IDEs with certain types of autocompletion. Since the C++ library uses free functions, however, the Python interface should also support that, to not put mental strain on people who use both the C++ and the Python interface.

from boost-histogram.

HDembinski avatar HDembinski commented on May 25, 2024

Can we make histogram::rank and histogram::size into properties?

from boost-histogram.

henryiii avatar henryiii commented on May 25, 2024

Yes

from boost-histogram.

henryiii avatar henryiii commented on May 25, 2024

I think all these are changed/fixed, correct? Can we close?

from boost-histogram.

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.