Why `eye` has been deprecated?

At the risk of pointing out the obvious, there is evidently an expectation from some users (actual and potential) that Julia syntax is similar to Matlab, and probably having eye and some of the others that have been mentioned in earlier releases helped reinforce those expectations, and their deprecation has predictable results among that group. You can imagine that users coming from other languages might have similar reactions for different deprecations (and/or just syntax/features they wish would be part of Julia and aren’t).

Personally one of the things I really like about Julia is that the developers seem not to be limiting themselves to what are (currently) familiar syntax/idioms from older languages, and often as I learn more about Julia and some of the reasons behind these choices my appreciation for Julia’s design grows.

Constructively, and I suspect it’s been suggested before (and it looks like perhaps worked on at least at some point [1]), but, one of the nice things about Julia is that we can extend it easily. That fact can be used to help those who would prefer that something like eye still be available (just to take a specific example) while not requiring everyone else to have it in their namespace. And in fact I think it can be better than including these in the base language (or stdlib) because if for example you are writing MatlabToJulia.eye it can be more geared towards those coming from Matlab than, say, PythonToJulia.eye. By doing this on a language-by-language basis you could also probably use the deprecation system to optionally give helpful guidance towards a more Julian implementation that is appropriate for the source language when these functions are used.

I think with some forethought (avoiding a huge set of dependencies would be a concern, I think), a<LanguageX>ToJulia.jl packages could be a useful tool. I’d be open to working on something like this (for MatlabToJulia.jl) as it would complement what I’m trying to do with the Julia for MATLAB Users Wikibook. Any other potential contributors? :slight_smile:

Somewhat related thread: Should we mimic R (, MATLAB, ...) functions?

[1] https://github.com/MatlabCompat/MatlabCompat.jl

2 Likes