2 ms·
A good point. If my goal is educational (and it 2/3 is), these stupid short names are a huge oversight. I honestly didn't think about it much. I think I starte
by philzook 6y ago
A good point. If my goal is educational (and it 2/3 is), these stupid short names are a huge oversight. I honestly didn't think about it much.
I think I started from known Haskell names, some conventions that I may have absorbed from catlab.jl and other places, and some unthoughtful accidents. I really really wanted id to be the identity, but I'm pretty sure it's a python keyword. I added a d and vowed to never speak of it again. Ever written a program about schools and had to use the variable Klass?
I don't feel too bad about mplus and mzero. It's still pretty clear that they are something like plus and zero, but the m gives you pause. And it should, since in one case mplus is in fact multiplication.
If this was rolled out into a library maybe I'd have both long and short names? I'd never want a library to have only long names for really common things. cod and dom don't actually give me a seconds pause. I like them having the same length too. Makes code prettier and easier to read. I also intend to replace some things with operators which would be even more inscrutable to a newcomer. @ has to be compose for example (to mimic numpy).
- tom_mellior 6y ago> I really really wanted id to be the identity, but I'm pretty sure it's a python keyword. It's a built-in function, but you can overload it within a scope you control without problems: >>> id <built-in function id> >>> id = 7 >>> id 7 > And it should, since in one case mplus is in fact multiplication. Good point! I take this part back. As for having identifiers the same length, I know the urge, but usually find the superficial "elegance" it's not worth it.