Ugly Types: Less Ugly Than History, Can We Do Better?

In a way, I think this just goes to prove my point. Yet again, we see the most common thing to do with types is to match against them. And, in your words, when we’re matching types it’s nice if we’re not ‘locked in a 1:1 heart:type ratio’. To me, that again implies that it should be able to take constraints, like SWITCH/TYPE does… and you can’t do that simply by SWITCHing against TYPE OF.

I suppose the point I’m making is that TYPE OF is limited in a very fundamental sense: it can only ever return one value. Perhaps you can try to predict ahead of time what people will want to test, and add things like LOGIC! that to the output of TYPE OF… but then comes someone who wants to test if a number is EVEN?, and TYPE OF just doesn’t give you that information. That’s why I think it’s a good idea to keep TYPE OF a direct reflection of the heart-byte, and use other constructions for code which needs other things.

I’ll put my support strongly behind this. Pattern-matching is inordinately useful.

This is really where my expertise lies. I’m a Haskeller — I spend a long time thinking about types and type systems. Additionally, over the past year or two I’ve been learning a lot about structural type systems (i.e. ones which allow union and intersection), including making my own. So when I say things like ‘a Haskell-like type system isn’t a great fit for Rebol’, there’s some intuition behind those statements.

Sure, but I just wanted to get some statistics quickly, and Ren-C itself is the largest Ren-C codebase that I know of. (Also, sometimes I get curious how things are implemented internally.)