Replies: 1 comment 2 replies
-
Do collaborators get automatic notification on something like this? I hope so. It seems like this could be one of the easier issues to resolve. Would love to hear people's thoughts. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The reason we went with SHOUTY types (
INT
,HASH
, and so on) is because it was a subtle disaffordance to using native types. We'd want to encourage people to create meaningful types. Instead of this:We'd encourage this:
And in the type definitions:
Or more succinctly (and more performant):
However, "SHOUTY" checks has been one of the primary sources of complaints about the syntax and honestly, they annoy the heck out of me, too.
In reviewing code bases using
Type::Tiny
, I often find people resorting just to the bundled types because they have a "one-off" signature that doesn't justify the burden of declaring a new check. And honestly, SHOUTY doesn't feel very Perlish.My current thought it to do something similar to Java. Native types would be lower-case and user-defined would have to start with an upper-case ASCII letter.
That certainly violates the original intent, but the aesthetics are better (IMHO) and the clear distinction between user and native types would remain.
Beta Was this translation helpful? Give feedback.
All reactions