kasei / attean

A Perl Semantic Web Framework
19 stars 10 forks source link

A proposal to use the namespace types #137

Closed kjetilk closed 5 years ago

kjetilk commented 5 years ago

While thinking about coercions, I started to think about the type system, and then figured it might be appropriate to use the types already there. Please have a look to see if this makes sense.

kasei commented 5 years ago

I'm not familiar with this approach, but it seems pretty straightforward. Do you think there are any downsides to this? If not, I'm happy to merge it.

kjetilk commented 5 years ago

I'm not aware of downsides. I suppose the code path becomes more complex and so it could be slower, but it seems to be the Right Way to do it from a typing perspective.

It seems like we should use something like this whereever we say InstanceOf.