On 2 May, Luke Palmer wrote: : S12 says: : : subtype Str_not2b of Str where /^[isnt|arent|amnot|aint]$/; : : My brain parses this as: : : subtype Str_not2b[Str where /.../]; : : Or: : : subtype Str_not2b[Str] where /.../; : : Neither of which really reflect how it is really parsed. It looks like : `subtype` has a special syntax. I find this to be free of special : syntax and clearer to boot: : : type Str_not2b ::= Str where /^[isnt|arent|amnot|aint]$/;
Although, I'm aware, that introducing an idiom in favor of some, occasionally perceived, ancient C programming techniques, will do my reputation some harm among certain native programmer circles, I dare to continue stating the inobvious. If I compare last, given example against the previous ones, it is much more apparent, in my opinion, that we're in the process of becoming acquainted with the declaration of a subtype, regardless of the fact that we set ourselves back to "common" compile-time binding syntax; typedef is known amongst C knowledgables as a declaration of a synonym for a type and did inevitably trigger this recognition. But, I'd rather be cautious, to differentiate between what we had (C) and what we're striving for (Perl). : Why don't we just ditch the `subtype` keyword? I've the same feeling. : Luke Steven