Opened 8 years ago

Closed 8 years ago

#309 closed defect (invalid)

Holder can be Is_Empty and Is_Universal_String simultaneously

Reported by: ivan.levashev Owned by:
Priority: trivial Milestone:
Component: Matreshka - League Version:
Keywords: Holder Is_Empty Is_Universal_String Cc:


I guess, that was maid intentionally, to make output variables typed in SQL, but it's counter-intuitive when reasoning about values. Maybe there should be a more explicit distinction between empty string and non-empty string? I mean, Is_Universal_String should return False for Data'Tag => League.Holders.Universal_String_Tag and Is_Empty => True unless some non-default argument was specified to Is_Universal_String.

Those who are willing to check tag of empty holder should do it in a manner distinct from everybody else who only need to deal with values and only want to see Is_Universal_String = True when there is a real string inside.

Change History (1)

comment:1 by vadim.godunko, 8 years ago

Resolution: invalid
Status: newclosed

This is expected behavior. Holder can have 'type' but be empty. It can be useful in some cases to pass hints of expected types to modules which will return values.

Note: See TracTickets for help on using tickets.