You can use underscore _ as a placeholder, for example:
_, _, x = (1, 2, 3)
On Wednesday, April 22, 2015 at 5:09:16 PM UTC-7, Ryan Li wrote:
>
> Hi,
> I was wondering if there is any argument placeholder in Julia.
> In Matlab, if we do not require one return argument, we just replace it
> with
Note that the underscore is only a convention--it is also a legal identifier.
Something I hadn't thought about before, and would be worth checking, is
whether this could cause type stability issues. They're all dead stores, so
they shouldn't, but I'm not sure if anyone has explicitly checked for
The underscore actually is used as a variable name, which could be
dangerous in the code.
I am not sure if this is worth to take the risk.
On Wednesday, April 22, 2015 at 6:00:00 PM UTC-7, Darwin Darakananda wrote:
>
> You can use underscore _ as a placeholder, for example:
>
> _, _, x = (1, 2, 3
What's the risk?
On Thu, Apr 23, 2015 at 4:24 PM, Ryan Li wrote:
> The underscore actually is used as a variable name, which could be
> dangerous in the code.
> I am not sure if this is worth to take the risk.
>
>
> On Wednesday, April 22, 2015 at 6:00:00 PM UTC-7, Darwin Darakananda wrote:
>>
>
The data type and size of "_" could change overtime. The reallocation of
the memory for "_" could be expensive if the data structure for "_" is
complicated.
On Thursday, April 23, 2015 at 1:48:03 PM UTC-7, Stefan Karpinski wrote:
>
> What's the risk?
>
> On Thu, Apr 23, 2015 at 4:24 PM, Ryan Li