Julia is developing over time. Originally, eye was probably implemented to mimic Matlab. Later we realized that the type system allowed us to define the much nicer UniformScaling which has the special case
const I = UniformScaling(1) which is almost alway better to use unless you plan to modify some of the elements of the diagonal matrix after construction. See also https://github.com/JuliaLang/julia/pull/5810#issuecomment-37983457 and maybe the rest of that discussion. On Mon, Aug 29, 2016 at 6:39 AM, Júlio Hoffimann <julio.hoffim...@gmail.com> wrote: > I'd like to understand the existence of eye() in Julia, it is still not > clear to me. Is it because one wants type stability when updating a matrix > iteratively? Is this possibly a limitation from the design of the language? > > -Júlio >