Coder Social home page Coder Social logo

Comments (16)

mielvds avatar mielvds commented on May 22, 2024

Again thanks for taking this forward! As I'm not sufficiently qualified in C++, I can't fully assess this. @MarioAriasGa @joachimvh any thoughts?

Dependent applications at the moment are at least the GUI application hdt-it (also in this repo) and the HDT-Node library. I believe we should design a versioning approach for the code releases, and the indexes they generate (#7), first.

from hdt-cpp.

RubenVerborgh avatar RubenVerborgh commented on May 22, 2024

I have encountered problems 1, 2, and 3 myself and I agree that a fix would indeed be good. The exception thing has bitten us several times. And the const thing troubled me in at least one location, where I was not allowed to read something from a const object. I think I indeed also saw a couple of instances of 4 as well.

So thanks in advance for looking at these :-)

from hdt-cpp.

artob avatar artob commented on May 22, 2024

Thanks @RubenVerborgh and @mielvds for your feedback.

I've begun tackling these issues, starting with const-correctness since that is somewhat lower hanging than the other actionables, in that while it may affect the library ABI, it does preserve source compatibility—meaning that existing applications only need recompile, at worst.

This work is happening on the const-correctness branch of our fork. I would expect to submit that branch as a pull request sometime next week once further along.

from hdt-cpp.

RubenVerborgh avatar RubenVerborgh commented on May 22, 2024

Thanks, @bendiken, much appreciated!

from hdt-cpp.

mielvds avatar mielvds commented on May 22, 2024

I created version 1.1.1 (https://github.com/rdfhdt/hdt-cpp/releases/tag/1.1.1) at the point where the code moved from google code to github (as named by @MarioAriasGa in d343fa8). The code on the website is 1.0.0. This gives us a point of reference for future releases and incompatibilities.

from hdt-cpp.

RubenVerborgh avatar RubenVerborgh commented on May 22, 2024

Thanks a lot, Miel! Will indeed be handy to reference. We can/should probably stay within 1.x as long as the outputted HDT files are compatible.

from hdt-cpp.

MarioAriasGa avatar MarioAriasGa commented on May 22, 2024

Thanks bendiken,

I agree with your improvements. I will keep an eye in case I can help.

I will make sure that the HDT-it! app also compiles with your changes.

Thanks again!

Mario.

from hdt-cpp.

artob avatar artob commented on May 22, 2024

@mielvds That's good thinking, and means we might perhaps consider these changes to constitute a 1.2.x API.

@MarioAriasGa Thank you for weighing in—I will hence proceed according to the outlined plan, and submit pull requests for each of these action items.

from hdt-cpp.

mielvds avatar mielvds commented on May 22, 2024

I would propose 1.1.2, since no breaking changes in the HDT file or index are introduced, right? See my proposal on versioning in #7

from hdt-cpp.

artob avatar artob commented on May 22, 2024

I've merged the initial const-correctness work in 42a5b07. This improves type safety as well as reduces memory allocations and spurious string copying. The semantic changes to the API are minor and unlikely to affect any users (such as HDT-it!).

from hdt-cpp.

webdata avatar webdata commented on May 22, 2024

Hi, @bendiken I couldn't run the code with the new API because of the new exception in ControlInformation. I had to perform several changes to catch this exception throughout the code, already considered in the last commits 42caf47, 0253fe2

from hdt-cpp.

artob avatar artob commented on May 22, 2024

@webdata Right, that type of thing could be a consequence of const-correctness changes.

If the exception in case of nonexistent keys proves too onerous for client code (it certainly complicated the client code in 42caf47 and 0253fe2), we could make the method return a const reference to a static empty string in the nonexistent key case, which would preserve full source compatibility with existing code. It'd be easy enough to do.

What do you think? You did already make the client code changes, but Git also makes them easy to revert.

from hdt-cpp.

webdata avatar webdata commented on May 22, 2024

Yes, if you don't need to distinguish between an existing empty property and a non-existing property, that could be possible.

from hdt-cpp.

LaurensRietveld avatar LaurensRietveld commented on May 22, 2024

I took a first stab at modifying exception handling. See this PR: #35

from hdt-cpp.

mielvds avatar mielvds commented on May 22, 2024

Let's try to have these fixes by mid 2017

from hdt-cpp.

RubenVerborgh avatar RubenVerborgh commented on May 22, 2024

The majority of these issues seem to be addressed, so I will close this. Feel free to create new issues for subpoints where necessary.

from hdt-cpp.

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.