Skip to content

RFC: Replace unibool with uniprop-bool in S15 #119

Open
@samcv

Description

The current spec says uniprop returns the narrowest numerical type for numerical properties and boolean for boolean properties, and returns Str for all other properties.

It also mentions a unibool function. At the moment we have uniprop-bool, uniprop-int, uniprop-str in Rakudo, but they are not in the docs or Roast. I think the only useful one of these we might want to keep would be the uniprop-bool function, which could be used to check the absence of a property.
This code below shows an example I think makes logical sense, and is also currently what Rakudo does.

'a'.uniprop-bool('Numerical_Type') #> False
'a'.uniprop-bool('Hangul_Syllable_Type') #> False
'a'.uniprop('Numerical_Type') #> None
''.uniprop('Hangul_Syllable_Type') #> NVT

See discussion here:
https://irclog.perlgeek.de/perl6/2016-12-16#i_13751405
@jnthn

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions