InformationMeasures.jl icon indicating copy to clipboard operation
InformationMeasures.jl copied to clipboard

Do not use `get_` in function names

Open nalimilan opened this issue 7 years ago • 2 comments

I was just giving a look at the package and I noticed function names start with get_. The convention in Julia is to use short function names, without get. For example, entropy would read better than get_entropy.

Anyway, these are my two cents. Keep up the good work!

nalimilan avatar Jun 07 '17 09:06 nalimilan

Thanks! Yes I agree these should be renamed. Do you have any thoughts on some of the longer names, e.g. whether to replace get_conditional_mutual_information with conditional_mutual_information or cond_mi or cmi, etc? My instinct is to err on the side of longer names for clarity and to avoid naming conflicts, but perhaps this doesn't fit so well with Julia's short function names...

Tchanders avatar Jun 22 '17 05:06 Tchanders

Hard to tell. In StatsBase we have functions like aic and r2, so short names are definitely OK when their meaning is clear. But we also have loglikelihood. I guess it depends on whether an acronym is reasonably standard in the relevant field or not.

nalimilan avatar Jun 22 '17 09:06 nalimilan