On Wednesday, 22 October 2014 at 12:17:32 UTC, Dejan Lekic wrote:
It is easy to write ugly code in D without string mixins. Just take a look at the (ab)use of UFCS...
I am not a fan of UFCS either… I think it is nice to be able to extend aggregates with new member functions, UFCS isn't required to do that.
I think it would be better to focus on formally defining a nice generic vocabulary of free functions: sort, length etc… and rather add regular pipelining with tuples. E.g.:
arr -> sort -> serialize -> f.write; ===> savearray(serialize(sort(arr)))
[(1,2),(3,4)] -> ((_,y1),(x2,_)) => y1*x2 -> f.write;
