April 06, 2009 silly question: why can't i alias an expression? | ||||
|---|---|---|---|---|
| ||||
why is something like that not possible? (except the missing langauge feature thing) could it be a nice extension? double A,B; alias ( A + B * 10 ) my_expression; double C = my_expression; | ||||
April 06, 2009 Re: silly question: why can't i alias an expression? | ||||
|---|---|---|---|---|
| ||||
Posted in reply to dennis luehring | Reply to dennis,
> why is something like that not possible? (except the missing langauge
> feature thing)
>
> could it be a nice extension?
>
> double A,B;
> alias ( A + B * 10 ) my_expression;
> double C = my_expression;
You can only alias things that at some level are symbols. In effect an alias is a link (as in soft/hard link) in the symbol table.
| |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply