2 ms·
I am simply referring naming a method into(). Into… what? It’s like one of those 2010 frameworks that used .use(). The name communicates very little. It sounds
by nailer 4y ago
I am simply referring naming a method into(). Into… what? It’s like one of those 2010 frameworks that used .use(). The name communicates very little.
It sounds like it should be called .intoType() or .fixType() (it seems to use the compiler to work out the specific type) but again I don’t care about the answer I’m merely commenting that it’s not evident from reading the code as someone that knows a few languages.
- kevincox 4y agoBut that's the thing. It is into anything. The method name can't be any more specific because the method isn't more specific.
- nailer 4y agoHence not mentioning a specific type in either suggestion. The method name can be understandable without having to resort to docs, and without having to mention specific types. With the current vague name I thought string.into() would be some kind of character converter.