New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add normal-looking aliases to standard library gates #6881
base: develop
Are you sure you want to change the base?
Conversation
The four-letter names are clever, but in cases where there are well-defined names for concepts in the rest of programming, we should use them.
Fun bikeshed: For instance, though perhaps the name shadowing is not ideal:
I could imagine pointing people to this "alias" file in the standard library instead of hoon.hoon |
This would mean that, assuming your example, they'd be accessed as |
Yes, which is very explicit and predictable (good for newcomers). The other advantage is that all the "nicely named" functions would be together, which would make them easier to find and use for newcomers. I imagine =, and =* could be sufficient for making them more ergonomic in practice.
|
If I had |
Yes, hence my comment that the name shadowing in my suggestion isn't ideal... I just can't help but think there's a better naming scheme for things than having no outer core name, like the list utilities, or "by", "in", etc that have no relation to what they do. |
Yeah, I think you're on to something here. Making naming more regular across the board at the expense of verbosity seems like a net positive. A dumb way to do it:
|
One idea... these are all "collections" of things, and potentially could have their type in them as well.
Usage:
|
I've thought for a while we might want to structure the stdlib like this: ++ list
=< form
|%
++ form |$ [a] $?(~ [i=a t=$])
++ flop |*(...)
++ turn |*(...)
...
-- This way you can still use |
That sounds great Ted |
The four-letter names are clever, but in cases where there are well-defined names for concepts in the rest of programming, we should use them.
TODO: