On Friday, 20 November 2020 at 18:46:40 UTC, Martin wrote:
On Friday, 20 November 2020 at 10:03:18 UTC, Daniel Kozak wrote:
I remember days when I liked UFCS too . Unfortunately it is
not so awesome when you use it with IDE.
And I would like to add: if you use in a bigger team. It's
annoying when every dev have a own taste.. And together with
optional () it's hell - no joke.
The need to think about codeatyle definitions in such detail is
a nogo for big projects.
This is a good point. I find with D there are many different ways
to write code and each can look different on the page. Where I
work we mandated all D code will be implemented in Phobos style
and use Phobos and mir source as guides. Some parts do heavily
use UFCS/optional() and some parts do not. We have not had issues
with readability, but maybe our D code isn't that complicated
because it is mostly PC side data analysis tools.
Personally a really like UFCS, even `"hello".writeln;` and I
think I'd rather have UFCS than autocompletion. But then I did
start out in industry well before autocomplete was a thing so
maybe I have never relied on it too much.
Thanks all for the replies!
norm