I agree with Sheehan that this affect a number of functions in Base, not 
just eye - that was the point I was trying to make, sorry I wasn't clear.

I raised this in a discussion in a formal issue somewhere, which I can't 
find now. Somebody (Steven Johnson?) argued that `zeros` and `ones` are 
different because they are used for allocating arrays.

With every discussion like this one (previously linspace) targeted at 
"cleaning up" the language and disallowing "bad practices" I always feel 
that Julia is becoming more and more a language for Computer Scientists 
while casual programmers are pushed away. In fact this doesn't just affect 
casual programmers: for almost every new project I first cook up a little 
toy-model where I really just brainstorm - often I write bad code, but this 
is ok. I like that fact that I can do that in Julia (for now) without 
getting punished.  In those little toy models it is usual irrelevant that 
linspace and even eye return arrays instead of lazy data structures - in 
fact it allows me to think less about what are the objects I am 
manipulating. Every small distraction like that breaks the flow of 
thoughts.  I can always go back later and refactor my code (or usually 
rewrite it) with good structure and performance in mind. 

Christoph

On Tuesday, 30 August 2016 06:39:40 UTC+1, Sheehan Olver wrote:
>
> But the core issue isn't 'eye' specific, it's "what should the default 
> type for functions that create matrices be?"    Christoph's comments do not 
> deviate from this question.
>
> The answer to this question affects 'rand', 'zeros', 'ones', 'linspace', 
> etc. just as much as eye.  ArrayFire means that this might want to be 
> created on the GPU which should be taken into account: the syntax 
> 'AFArray(eye(10))' cannot work unless eye(10) returns a special type.
>
> On Tuesday, August 30, 2016 at 2:19:38 PM UTC+10, Júlio Hoffimann wrote:
>>
>> Sorry for the combative tone Christoph. I thought it was necessary in 
>> order to not deviate too much from the core issue. Thank you for your 
>> participation and for raising your personal opinions about the topic.
>>
>> -Júlio
>>
>

Reply via email to