Skip to content
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

Design Question: Scalars #17

Closed
berndbischl opened this issue May 24, 2014 · 3 comments
Closed

Design Question: Scalars #17

berndbischl opened this issue May 24, 2014 · 3 comments

Comments

@berndbischl
Copy link
Collaborator

It seems to be the design is somewhat inconsistent wrt to the scalars.

IMHO these should allow more flexibility.

  • At least bounds should be checkable for numbers / ints. This extremely common
  • We need a scalar integerish, which is not a count.
  • complex scalar is missing. This is mainly for completeness. I have never needed that until now.

The point is: If one has to very often resort to the check*Vector operations, to do these types of checks (ala bounds) one will simply remember those.

Note that I am NOT arguing for exposing everything of the vector interface. But the most common stuff should be exposed for the scalars. If this has reasonable defaults and the same names as for the vector, nobody gets hurt and its easy to remember.

It is actually probably LESS intuitive that some of those args are missing.

@berndbischl
Copy link
Collaborator Author

Acutally forget about "inconsisent design".

Simply this should be addressed:

  • Bounds must be checkable for numbers / ints
  • We need a scalar integerish, which is not a count.
  • complex scalar is missing (?) (I dont care about this)

@mllg
Copy link
Owner

mllg commented May 28, 2014

We need a scalar integerish, which is not a count.

Suggestions for a short name?

@berndbischl
Copy link
Collaborator Author

It's hard, because "assertInteger" means the vector.

We can talk about this in person, if you want. Problem might be that there is no "shorthand signifier" in the name that expresses "vector" or "scalar." And I am really not sure what is best.

Nevertheless how do you like this:

  • assertLong
  • assertWord
  • assertDWord
  • assertDoubleWord

http://en.wikipedia.org/wiki/Integer_(computer_science)

Each of these names is suboptimal for a different reason though, I just dont know anything else...
Also it does not express "integerish...."

Let's talk, I can really not express what I what to say in writing here.

@mllg mllg closed this as completed in 9c14cf9 Jun 6, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants