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

more concise typed property values #13

Open
bolerio opened this issue Jul 13, 2015 · 0 comments
Open

more concise typed property values #13

bolerio opened this issue Jul 13, 2015 · 0 comments

Comments

@bolerio
Copy link
Owner

bolerio commented Jul 13, 2015

The interface will of course fatten a bit, but that's also the point of having a single class. Instead of writing

object.at(propertyname).asString()

we could write

object.asString(propertyname)

or for arrays:

object.asString(10)

and like this for all asXXX methods.

Or drop the "as" here since we are not "at the value" yet to be say that we look at it "as something". So maybe just like this:

object.string(propname)
object.bool(properyname)

that's even shorter, but the problem is new method names and less consistency with the rest of the API. Is saving a few characters worth the loss of consistency? Don't think so..

@bolerio bolerio added this to the 1.5 milestone Jul 4, 2016
@bolerio bolerio removed this from the 1.5 milestone Jan 27, 2017
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

1 participant