The stately := operator feature proposal

Russel Winder russel at winder.org.uk
Thu May 30 01:43:36 PDT 2013


On Thu, 2013-05-30 at 02:19 +0200, MrzlganeE wrote:
[…]
> In places where I write a bunch of short mathy code, I do not 
> want to use 'auto'. The := operator would allow to declare a 
> variable, deduce its type, and define its value.
> 
> void main() {
>      x := 1;
>      y := 2.0;
>      z := x * y;
>      y = 3.0;
> }
[…]
> 
>      for (i := 0; i < 24; i++) {
>      }

Go does exactly this, and it is good.

Less is more.

-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder at ekiga.net
41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel at winder.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20130530/231dd69e/attachment.pgp>


More information about the Digitalmars-d mailing list