Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Should Property override to_s to return the value as a string? #3
eyal.age now returns a Property, not a value as it did in the old API. You need to use eyal.age.first, or eyal.age.only to get the value. And this will fail if eyal.age is nil.
Should Property override to_s so that eyal.age prints the value of the property instead of its URI? This might be a convenience in string expressions and would provide some backward compatibility with the old API and examples.
The key is that all properties can be multi-valued. It seems that eyal.age should never return nil, it should return at least . But currently it is possible that a property that has no value will be nil. In the context of multi-valued properties, is there a semantic difference between nil and . The difference could be whether these is a schema defining the domain of the property or not.