Our conversions throw errors when the value cannot be converted exactly these 
days so it could be done pretty safely. But yes, this is just because there's 
no applicable method of linspace.


> On Nov 29, 2014, at 7:07 AM, Tamas Papp <[email protected]> wrote:
> 
> I think of this as a feature: using a float when only an integer makes
> sense is most likely a bug in my code. Automatic conversion would mask
> the problem.
> 
> Best,
> 
> Tamas
> 
>> On Sat, Nov 29 2014, [email protected] wrote:
>> 
>> One of the primary paradigms of Julia is the use of multiple dispatch, that
>> is choosing which method to call based on the types of the parameters
>> provided.  To quote from the manual
>> http://docs.julialang.org/en/latest/manual/methods/#defining-methods "No
>> automatic casting or conversion of function arguments is ever performed:
>> all conversion in Julia is non-magical and completely explicit."
>> 
>> Cheers
>> Lex
>> 
>>> On Saturday, November 29, 2014 8:17:26 PM UTC+10, Christoph Ortner wrote:
>>> 
>>> 
>>> In Julia 3.3  `linspace(0, 1, 10) `  works, but    `linspace(0, 1, 10.)`
>>> does not.
>>> 
>>> Why is the type not automatically converted to Int when possible? Is this
>>> intended or a bug?
>>> 
>>>    Christoph
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 

Reply via email to