The stately := operator feature proposal

Joseph Rushton Wakeling joseph.wakeling at webdrake.net
Thu May 30 17:32:48 PDT 2013


On 05/30/2013 10:39 PM, MrzlganeE wrote:
> In the case where it's a really basic thing that opens up a nice level of
> expressiveness for a different type of programmer, and there's no compromise
> that can bring us both together, it's OK to support us both!
> 
> Because how can the current 'auto' work for both of us?
> How could I ever be happy writing math like that?

There is a compromise here, which is to define the Math template that Diggory
already suggested to you, and share it with the community.

Yes, you'll have to surround your code with mixin Math!q { ... }; statements,
which I know you'd prefer not to.  But on the other hand this has the advantage
of explicitly marking parts of the code which are intended to follow
mathematical notation.

And, having _done_ that, and made it available for others, it's possible to see
how many people find that option useful and whether or not there are any nasty
errors that could arise out of it (at least one person has already suggested a
potential typo-related bug).

If people _do_ find it useful, then you have a much better case for asking for
this syntactic sugar to be added to the language.


More information about the Digitalmars-d mailing list