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

Rename the value-getting subs to value() #41

Closed
masak opened this issue Oct 14, 2015 · 0 comments
Closed

Rename the value-getting subs to value() #41

masak opened this issue Oct 14, 2015 · 0 comments

Comments

@masak
Copy link
Owner

masak commented Oct 14, 2015

Currently,

int(Q::Literal::Int(42));            # 42
str(Q::Literal::Str("Bond"));        # "Bond"
array(Q::Literal::Array([1, 2]));    # [1, 2]

At the time, I thought it kind of cute that we could re-use int and str as both coercers and destructors. Now it feels like the "cute today" kind of cute, though. (For some value of "today" in the past.)

I'd like to rename all these to value() instead. Reasons:

  • It's clearer what that actually does
  • It puts all literals under a unified interface, kind of (even Q::Literal::None!)
  • It looks better when written as method calls
@masak masak closed this as completed in 6ad4591 Oct 14, 2015
vendethiel pushed a commit to vendethiel/007 that referenced this issue Oct 20, 2015
Instead of different subs: str(), int(), array()

Closes masak#41.
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