samdark
(Alexander Makarov)
July 4, 2019, 4:59pm
1
Same as with interfaces , some experiments were conducted to check if not using Exception
suffix is good or not.
This time it is more controversial. If named carefully, we can get names like FromattingFailed i.e. convention could be:
Past simple tense. Indicates that it happened.
Should indicate something bad happened.
What do you think about it?
What exception naming style do you prefer?
I prefer to use suffix, i.e. FormattingException
I prefer no suffix i.e. FormattingFailed
FormattingFailedException?
Are there any projects using such convention?
samdark
(Alexander Makarov)
July 5, 2019, 11:34am
5
Also, here’s an article (one of many) that describes rationale behind such experiment: https://mnapoli.fr/approaching-coding-style-rationally/
rob006
July 5, 2019, 12:25pm
6
Although I can understand this for interfaces, for exceptions you get exactly opposite result - name no longer represents “what it is”. FormatingFailed
is not a thing, it is a sentence. It contradicts with general convention that object represents something, so you’re using nouns to describe it.
2 Likes
samdark
(Alexander Makarov)
July 5, 2019, 2:31pm
7
OK. Based on voting here and at the Russian community forums
Note that it could be adjusted before release.
1 Like
evstevemd
(Stefano Mtangoo)
July 11, 2019, 12:39pm
8
That’s the real deal! I completly agree with @rob006