Thread overview | ||||||
---|---|---|---|---|---|---|
|
July 03, 2016 Way to use var instead of auto? | ||||
---|---|---|---|---|
| ||||
I like the term var better than auto. Is there a way to alias auto? |
July 04, 2016 Re: Way to use var instead of auto? | ||||
---|---|---|---|---|
| ||||
Posted in reply to MMJones | On 07/04/2016 12:00 AM, MMJones wrote:
> I like the term var better than auto. Is there a way to alias auto?
no
|
July 04, 2016 Re: Way to use var instead of auto? | ||||
---|---|---|---|---|
| ||||
Posted in reply to MMJones | On Sunday, 3 July 2016 at 22:00:39 UTC, MMJones wrote:
> I like the term var better than auto. Is there a way to alias auto?
If you're thinking of var as in JS's var, they're not the same thing.
Even if you could alias it I would advise against doing something like that; assume your code will be maintained by someone else one day.
|
July 04, 2016 Re: Way to use var instead of auto? | ||||
---|---|---|---|---|
| ||||
Posted in reply to MMJones | On Sunday, 3 July 2016 at 22:00:39 UTC, MMJones wrote: > I like the term var better than auto. Is there a way to alias auto? If you really want to have Javascript-like semantics in D, you try this: https://github.com/adamdruppe/arsd/blob/master/jsvar.d |
Copyright © 1999-2021 by the D Language Foundation