Git Product home page Git Product logo

Comments (7)

LB-- avatar LB-- commented on August 10, 2024

::chesspp::config::GraphicsConfig is a deriving class from ::chesspp::config::Configuration. We could just add a memember function to Configuration to get the raw NestedValue with any json path you like. However I don't think we should change spritePath as it is specifically for the chesspp namespace - we would use a GraphicsConfig in a different namespace otherwise.

from chessplusplus.

Thumperrr avatar Thumperrr commented on August 10, 2024

My argument is that it's not a namespace. It's a path inside the json file. If you're looking at the json file, it doesn't make sense to me to have to explicitly leave out "chesspp" when creating paths. I see no reason why there couldnt be another top level node beside chesspp.

That is, spritePath("chesspp", "board", "image") is incorrect in the current code and spritePath("board", "image") is correct.

That initially makes sense but it's another thing to think about when you're looking at the json file. "Oh, I know the path is chesspp/board/image, but I don't need to specify the first part."

If I'm the only one that has this issue then I'll gladly forget about it.

-Stephen Hall

On Dec 24, 2013, at 4:18 PM, "LB--" [email protected] wrote:

::chesspp::config::GraphicsConfig is a deriving class from ::chesspp::config::Configuration. We could just add a memember function to Configuration to get the raw NestedValue with any json path you like. However I don't think we should change spritePath as it is specifically for the chesspp namespace - we would use a GraphicsConfig in a different namespace otherwise.


Reply to this email directly or view it on GitHub.

from chessplusplus.

jaredready avatar jaredready commented on August 10, 2024

I can see both sides here. It did throw me off and seem like unexpected
behavior, though.

On Tue, Dec 24, 2013 at 3:58 PM, Thumperrr [email protected] wrote:

My argument is that it's not a namespace. It's a path inside the json
file. If you're looking at the json file, it doesn't make sense to me to
have to explicitly leave out "chesspp" when creating paths. I see no reason
why there couldnt be another top level node beside chesspp.

That is, spritePath("chesspp", "board", "image") is incorrect in the
current code and spritePath("board", "image") is correct.

That initially makes sense but it's another thing to think about when
you're looking at the json file. "Oh, I know the path is
chesspp/board/image, but I don't need to specify the first part."

If I'm the only one that has this issue then I'll gladly forget about it.

-Stephen Hall

On Dec 24, 2013, at 4:18 PM, "LB--" [email protected] wrote:

::chesspp::config::GraphicsConfig is a deriving class from
::chesspp::config::Configuration. We could just add a memember function to
Configuration to get the raw NestedValue with any json path you like.
However I don't think we should change spritePath as it is specifically for
the chesspp namespace - we would use a GraphicsConfig in a different
namespace otherwise.


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHubhttps://github.com//issues/67#issuecomment-31186064
.

from chessplusplus.

LB-- avatar LB-- commented on August 10, 2024

@Thumperrr the thing is, the class in question is mean to be a convenience. In another namespace would would create a similar class with the same convenience. However now that I think of it it would be better if the json file itself were in a chesspp directory than to have chesspp mentioned in the json.

from chessplusplus.

Thumperrr avatar Thumperrr commented on August 10, 2024

The only problem I have with that is I don't like mixing C++ terminology and concepts in with json terminology and concepts, which are two different beings of their own. When i look at the json file I don't consider "chesspp" a namespace. I just consider it a root node that's the beginning of a path that gets to the node i'm looking for. If that's the case then I should include it in my search path.
I know it's meant to be a convenience to have "chesspp" specified for you. And I would be considering it as such if I didn't just have that little fiasco with ResidentBiscuit trying to figure out what the hell went wrong. Then, looking back on it, I started to feel like we should have to specify "chesspp" should the chesspp node exist at all.

from chessplusplus.

LB-- avatar LB-- commented on August 10, 2024

I think we should get rid of the chesspp from the json altogether and put the json in a chesspp subfolder.

from chessplusplus.

Thumperrr avatar Thumperrr commented on August 10, 2024

I can agree to that. I'll do that quickly and then open a PR.

from chessplusplus.

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.