Re: [julia-users] Allowing keywords in function calls without default values

2015-01-19 Thread Alexander Flyax
Thanks!

On Mon, Jan 19, 2015 at 5:44 PM, Stefan Karpinski 
wrote:

> You can define it like this:
>
> foo(1, 2, 3; many_more::Int=error("many_more is a required keyword
> argument"))
>
>
> We may, in the future, allow this to be written this way:
>
> foo(1, 2, 3; many_more::Int)
>
>
> but currently that won't work.
>
> On Mon, Jan 19, 2015 at 6:34 PM, AVF  wrote:
>
>> I want to write a function foo(x, y, z, many_more), which I could call
>> as foo(1, 2, 3, 5) or foo(1, 2, 3, many_more=5), but I don't want to
>> have to supply a default value for many_more in my function's
>> definition. I just want to have the option of not remembering the positions
>> of x...many_more without required having default values for them.
>>
>> Is that currently possible? Thanks...
>>
>
>


Re: [julia-users] Allowing keywords in function calls without default values

2015-01-19 Thread Stefan Karpinski
You can define it like this:

foo(1, 2, 3; many_more::Int=error("many_more is a required keyword
argument"))


We may, in the future, allow this to be written this way:

foo(1, 2, 3; many_more::Int)


but currently that won't work.

On Mon, Jan 19, 2015 at 6:34 PM, AVF  wrote:

> I want to write a function foo(x, y, z, many_more), which I could call as 
> foo(1,
> 2, 3, 5) or foo(1, 2, 3, many_more=5), but I don't want to have to supply
> a default value for many_more in my function's definition. I just want to
> have the option of not remembering the positions of x...many_more without
> required having default values for them.
>
> Is that currently possible? Thanks...
>


[julia-users] Allowing keywords in function calls without default values

2015-01-19 Thread AVF
I want to write a function foo(x, y, z, many_more), which I could call as 
foo(1, 
2, 3, 5) or foo(1, 2, 3, many_more=5), but I don't want to have to supply a 
default value for many_more in my function's definition. I just want to 
have the option of not remembering the positions of x...many_more without 
required having default values for them.

Is that currently possible? Thanks...