New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ea.stat() is only available in const version #47

Closed
JoostHuizinga opened this Issue Oct 11, 2016 · 3 comments

Comments

Projects
None yet
3 participants
@JoostHuizinga
Contributor

JoostHuizinga commented Oct 11, 2016

Okay, this will be the last issue I will submit for the day.

Is there a reason why the ea.stat() method is only available as a const version? Currently, I am only modifying the stat object in my (hopefully) obsolete continue module, but I wondered if there was any particular reason why I shouldn't. If not, I would suggest adding a non-cont ea.stat() method, just to provide users more freedom when designing algorithms or modules.

By the way, I would be happy to fix some of these issues myself (provided that they are actually issues that need to be fixed), and do a pull request.

@costashatz

This comment has been minimized.

Show comment
Hide comment
@costashatz

costashatz Nov 2, 2016

Collaborator

@jbmouret is there any reason why would you have objection of making ea.stat() non-const?

Collaborator

costashatz commented Nov 2, 2016

@jbmouret is there any reason why would you have objection of making ea.stat() non-const?

@jbmouret

This comment has been minimized.

Show comment
Hide comment
@jbmouret

jbmouret Nov 2, 2016

Member

In theory, stats should be pure observers that are queried, therefore they
should be const. Modifiers are very similar are can modify / be modified.

However, it makes things easier, a we can add a non const version of stat().

Le mer. 2 nov. 2016 12:26, Konstantinos Chatzilygeroudis <
notifications@github.com> a écrit :

@jbmouret https://github.com/jbmouret is there any reason why would you
have objection of making ea.stat() non-const?


You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub
#47 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AFu8v7ObArJOXrGcw0olVnNkBEiOKqj2ks5q6EkRgaJpZM4KTRZY
.

Member

jbmouret commented Nov 2, 2016

In theory, stats should be pure observers that are queried, therefore they
should be const. Modifiers are very similar are can modify / be modified.

However, it makes things easier, a we can add a non const version of stat().

Le mer. 2 nov. 2016 12:26, Konstantinos Chatzilygeroudis <
notifications@github.com> a écrit :

@jbmouret https://github.com/jbmouret is there any reason why would you
have objection of making ea.stat() non-const?


You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub
#47 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AFu8v7ObArJOXrGcw0olVnNkBEiOKqj2ks5q6EkRgaJpZM4KTRZY
.

@JoostHuizinga

This comment has been minimized.

Show comment
Hide comment
@JoostHuizinga

JoostHuizinga Nov 2, 2016

Contributor

I can see why that would be a good idea. I guess the only reason why I try to modify them is because I am also using these stat objects to determine what is written to (different) gen files.

Maybe there are better ways to write loadable gen files then what I am doing now.

Contributor

JoostHuizinga commented Nov 2, 2016

I can see why that would be a good idea. I guess the only reason why I try to modify them is because I am also using these stat objects to determine what is written to (different) gen files.

Maybe there are better ways to write loadable gen files then what I am doing now.

jbmouret added a commit that referenced this issue Dec 21, 2016

jbmouret added a commit that referenced this issue Mar 8, 2017

Merge pull request #61 from sferes2/non_const_stat
add a non-const stat() method in the Ea class (see #47)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment