Re: [julia-users] Newbie question about function name(::Type syntax

2015-04-21 Thread Patrick O'Leary
I'd go with 
https://julia.readthedocs.org/en/latest/manual/types/#singleton-types ?

On Tuesday, April 21, 2015 at 12:13:03 PM UTC-5, Tamas Papp wrote:
>
> I think it is implied that you can do this: there are quite a few 
> examples in the manual, eg 
> https://julia.readthedocs.org/en/latest/manual/types/#value-types 
>
> Best, 
>
> Tamas 
>
> On Tue, Apr 21 2015, Scott Jones  wrote: 
>
> > Ah, thanks for the *very* quick reply.  That’s quite useful. 
> > Did I somehow miss the explanation in the documentation (of 0.4), or 
> does 
> > that need to be added to the documentation of methods? 
> > 
> > Thanks, 
> > Scott 
> > 
> > On Tuesday, April 21, 2015 at 11:41:45 AM UTC-4, Stefan Karpinski wrote: 
> >> 
> >> It means that the argument doesn't get a local name but the method is 
> only 
> >> called if the argument in that position matches the type on the RHS of 
> the 
> >> :: 
> >> 
> >> On Tue, Apr 21, 2015 at 11:37 AM, Scott Jones  >> > wrote: 
> >> 
> >>> Just what does it mean, if there is a type but no formal parameter 
> name, 
> >>> in a function definition? 
> >>> I tried to find it in the documentation, but nothing came up... 
> >>> 
> >>> Thanks, 
> >>> Scott 
> >>> 
> >>> 
> >> 
>


Re: [julia-users] Newbie question about function name(::Type syntax

2015-04-21 Thread Kristoffer Carlsson
Discussion about return 
types: https://github.com/JuliaLang/julia/issues/1090

On Tuesday, April 21, 2015 at 7:25:47 PM UTC+2, Scott Jones wrote:
>
> I see that now, for some reason trying to do search on (:: in the docs 
> on-line didn't bring up anything...
>
>> Search Results
>> Your search did not match any documents. Please make sure that all words 
>> are spelled correctly and that you've selected enough categories.
>>
>
> However, I don't think that just having it implied in some section about 
> something else is really "documented" ;-)
> When I first saw it, I even wondered if it was some way of indicating the 
> return type of a method...
> (btw, *is* there any way of giving an indication of the return type?)
>
> Scott
>
> On Tuesday, April 21, 2015 at 1:13:03 PM UTC-4, Tamas Papp wrote:
>>
>> I think it is implied that you can do this: there are quite a few 
>> examples in the manual, eg 
>> https://julia.readthedocs.org/en/latest/manual/types/#value-types 
>>
>> Best, 
>>
>> Tamas 
>>
>> On Tue, Apr 21 2015, Scott Jones  wrote: 
>>
>> > Ah, thanks for the *very* quick reply.  That’s quite useful. 
>> > Did I somehow miss the explanation in the documentation (of 0.4), or 
>> does 
>> > that need to be added to the documentation of methods? 
>> > 
>> > Thanks, 
>> > Scott 
>> > 
>> > On Tuesday, April 21, 2015 at 11:41:45 AM UTC-4, Stefan Karpinski 
>> wrote: 
>> >> 
>> >> It means that the argument doesn't get a local name but the method is 
>> only 
>> >> called if the argument in that position matches the type on the RHS of 
>> the 
>> >> :: 
>> >> 
>> >> On Tue, Apr 21, 2015 at 11:37 AM, Scott Jones > >> > wrote: 
>> >> 
>> >>> Just what does it mean, if there is a type but no formal parameter 
>> name, 
>> >>> in a function definition? 
>> >>> I tried to find it in the documentation, but nothing came up... 
>> >>> 
>> >>> Thanks, 
>> >>> Scott 
>> >>> 
>> >>> 
>> >> 
>>
>

Re: [julia-users] Newbie question about function name(::Type syntax

2015-04-21 Thread Scott Jones
I see that now, for some reason trying to do search on (:: in the docs 
on-line didn't bring up anything...

> Search Results
> Your search did not match any documents. Please make sure that all words 
> are spelled correctly and that you've selected enough categories.
>

However, I don't think that just having it implied in some section about 
something else is really "documented" ;-)
When I first saw it, I even wondered if it was some way of indicating the 
return type of a method...
(btw, *is* there any way of giving an indication of the return type?)

Scott

On Tuesday, April 21, 2015 at 1:13:03 PM UTC-4, Tamas Papp wrote:
>
> I think it is implied that you can do this: there are quite a few 
> examples in the manual, eg 
> https://julia.readthedocs.org/en/latest/manual/types/#value-types 
>
> Best, 
>
> Tamas 
>
> On Tue, Apr 21 2015, Scott Jones > 
> wrote: 
>
> > Ah, thanks for the *very* quick reply.  That’s quite useful. 
> > Did I somehow miss the explanation in the documentation (of 0.4), or 
> does 
> > that need to be added to the documentation of methods? 
> > 
> > Thanks, 
> > Scott 
> > 
> > On Tuesday, April 21, 2015 at 11:41:45 AM UTC-4, Stefan Karpinski wrote: 
> >> 
> >> It means that the argument doesn't get a local name but the method is 
> only 
> >> called if the argument in that position matches the type on the RHS of 
> the 
> >> :: 
> >> 
> >> On Tue, Apr 21, 2015 at 11:37 AM, Scott Jones  >> > wrote: 
> >> 
> >>> Just what does it mean, if there is a type but no formal parameter 
> name, 
> >>> in a function definition? 
> >>> I tried to find it in the documentation, but nothing came up... 
> >>> 
> >>> Thanks, 
> >>> Scott 
> >>> 
> >>> 
> >> 
>


Re: [julia-users] Newbie question about function name(::Type syntax

2015-04-21 Thread Tamas Papp
I think it is implied that you can do this: there are quite a few
examples in the manual, eg
https://julia.readthedocs.org/en/latest/manual/types/#value-types

Best,

Tamas

On Tue, Apr 21 2015, Scott Jones  wrote:

> Ah, thanks for the *very* quick reply.  That’s quite useful.
> Did I somehow miss the explanation in the documentation (of 0.4), or does
> that need to be added to the documentation of methods?
>
> Thanks,
> Scott
>
> On Tuesday, April 21, 2015 at 11:41:45 AM UTC-4, Stefan Karpinski wrote:
>>
>> It means that the argument doesn't get a local name but the method is only
>> called if the argument in that position matches the type on the RHS of the
>> ::
>>
>> On Tue, Apr 21, 2015 at 11:37 AM, Scott Jones > > wrote:
>>
>>> Just what does it mean, if there is a type but no formal parameter name,
>>> in a function definition?
>>> I tried to find it in the documentation, but nothing came up...
>>>
>>> Thanks,
>>> Scott
>>>
>>>
>>


Re: [julia-users] Newbie question about function name(::Type syntax

2015-04-21 Thread Scott Jones
Ah, thanks for the *very* quick reply.  That’s quite useful.
Did I somehow miss the explanation in the documentation (of 0.4), or does 
that need to be added to the documentation of methods?

Thanks,
Scott

On Tuesday, April 21, 2015 at 11:41:45 AM UTC-4, Stefan Karpinski wrote:
>
> It means that the argument doesn't get a local name but the method is only 
> called if the argument in that position matches the type on the RHS of the 
> ::
>
> On Tue, Apr 21, 2015 at 11:37 AM, Scott Jones  > wrote:
>
>> Just what does it mean, if there is a type but no formal parameter name, 
>> in a function definition?
>> I tried to find it in the documentation, but nothing came up...
>>
>> Thanks,
>> Scott
>>
>>
>

Re: [julia-users] Newbie question about function name(::Type syntax

2015-04-21 Thread Stefan Karpinski
It means that the argument doesn't get a local name but the method is only
called if the argument in that position matches the type on the RHS of the
::

On Tue, Apr 21, 2015 at 11:37 AM, Scott Jones 
wrote:

> Just what does it mean, if there is a type but no formal parameter name,
> in a function definition?
> I tried to find it in the documentation, but nothing came up...
>
> Thanks,
> Scott
>
>


[julia-users] Newbie question about function name(::Type syntax

2015-04-21 Thread Scott Jones
Just what does it mean, if there is a type but no formal parameter name, in 
a function definition?
I tried to find it in the documentation, but nothing came up...

Thanks,
Scott