I didn’t say that being a janitor was bad, or something that is offensive to be compared to. I said that the comparison wasn’t fair, and the following text was supposed to explain why…
A janitor does important work, but it is routine work: cleaning, moving stuff around, and maybe doing some small repairs - but nothing that requires specialized, skilled (licensed) work. What I’m saying is that proper documentation and testing is not routine work. If you’ve ever had to document or test a program you did not write yourself you’ll know what I mean. It requires lots of knowledge and ability to read and understand code to do this well.
Anyway, since I don’t think there were any ill intentions I don’t think we should continue this sub-thread beyond this message. I think we’re all on the same page
Frankly, I don’t think that relying on idioms from other languages in parallel with Julia’s own is a good idea. I understand that people miss eye and similar, but they were removed for a reason. IMO just learning idiomatic Julia and keeping up with the changes is a better solution in the long run.
For example, I recently brought a library of mine up to date with v0.7, and had to rewrite a lot of uses of diagm & friends. A lot of time time this involved much more than simple replacement (thinking about what the deprecation message suggests, and reshaping it to my use case), but now the resulting code is much cleaner.
I use kron(X,I) all the time as well for quantum gates, and in S & R-matrices of quantum integrable models. Having a space-efficient solution for tensor products of different kinds of matrices in general would be very nice.
I agree: creating lazy kron types would be awesome for saving memory. Going down the route to better exploit the type system for efficiency is much more fruitful than trying to just make unnecessary matrices.
But when are you actually using this? I haven’t seen a code that should be making a dense identity matrix in a very long time. Does something that shows up up once every few hundred thousand lines of code really need a special shortened syntax?
Why not treat it as rand()? That’s, eye(n) is the default, the second n is redundant, and A .+ eye() is similar to A .+ rand() and eye(Int8,n), eye(Int16,n),eye(Int32,n),eye(Int64,n), eye(Float32,n) all with their obvious meanings are similar to their rand([..,] <size>) counterparts.
It’s not a sin to use a well-known, easy to remember and type, function from language X in Julia unless it is too bad. Also I seems a pretty natural choice, only if used as eye() described above. When I first used Julia, Version 0.2 I think, It was so intuitive and easy that I understood every thing in 3 days. I even delivered some lectures to colleagues who are 99% MATLAB users and many of them were impressed. Now, if say there is no eye but Matrix{Float64}(I, n, n), no linspace but range(start, step=, stop=), etc., I imagine people saying Ughhh … Also dims =, why all these unnecessary changes, too much explicitness leads to verbosity and noise. If something is intuitive and frequently used keep it very short and memorable. If you had to add dims =, for example, why not just dim = as Fortran?
This is not to say that all latest changes are bad at all, in fact Julia has made very nice improvements lately, the ones I mentioned are only small examples that need more reexamination.