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

Introduce the concept of truthiness #65

Open
calebhearth opened this issue Feb 20, 2013 · 0 comments
Open

Introduce the concept of truthiness #65

calebhearth opened this issue Feb 20, 2013 · 0 comments

Comments

@calebhearth
Copy link
Owner

Like Ruby, Dagon objects are truthy by default. Exceptions to this rule are
false and void, which are falsey.

Classes can also override Object's truthy*
method to return false and become falsey.

FalseyClass:
  truthy:
    false

falsy: FalseyClass()
if falsy
  "You never get here."

* The name of this method has not been finalized.

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