by MrPatan · 5y ago · 0 comments
Even in your example, I'd rather read this:
map<IN,OUT>(fn:(el:IN)=>OUT):OUT[]
Plus, it really is a habit. If you stop doing it for these kind of examples that really are very generic, maybe people wouldn't also use only one letter for cases where there is more of a difference between them.
> Do you also use one letter variables and parameters?
A question in response to your question... Do you ever give an ALL CAPS name to a class? Why not?Maybe it's the set of conventions I'm used to, but I find T, U, V familiar and IN, OUT jarring and dramatically less readable at a glance.
`fork<A,B,C>(fn1:(el:Iterator<A>)=>B,fn2:(el:Iterator<A>)=>C)`