On 05-Aug-12 18:32, Adam D. Ruppe wrote:
On Sunday, 5 August 2012 at 04:12:23 UTC, Jonathan M Davis wrote:
I'd be very surprised if all that many people compile with -property.
Indeed. Sometimes I try it just to see what happens, and always the same
results: it doesn't solve problems and complains about code.
+1
[snip]
And now the UFCS map, filter, etc. chains and whatnot are just icing on
the cake. Bearophile, I've seen you complain about the mess of
parenthesis in std.algorithm before. With ufcs and template arguments,
you can be rid of many of them. It is actually pretty beautiful, even to
me.
Do you really want to break that now?
My position right now is @property has a strict syntax out of necessity.
Stuff without @property should work the way it does now - thus
minimizing broken code to that which already opted-in to @property
(which generally does it right anyway), while keeping the status quo on
the rest. It can turn out ugly, I'll agree, but it can be beautiful too
and just plain isn't worth the code breakage either way.
Well in the end I think strict @property enforcement was meant to solve
some corner cases (e.g. returning delegates from, and taking address of
no-arg functions). But then it promptly killed at least one cool idiom
(chaining & assignment in one name). Then once UFCS was finally working
@property spoiled it (e.g. your algorithm examples).
So I'm with you - let non-@property work as before, and @property ones
to be god damn properly enforced.
--
Dmitry Olshansky