- shortnames should be banned: cholfact for instance might be replaced by
choleskyfactorization. Using shortnames without word separation is just a
nightmare. And it's not because Matlab is a mess regarding this matter that
Julia should imitate it.

I assume that name came from some Matlab or Numpy user. I think the more
Julian might be to write this as `factorize(Cholesky, ...)` where Cholesky
happens to also be the return type in this case, but also could have been a
singleton type.

Part of the push to use names without underscores is to encourage users to
choose names that are actually just a single word (or at most two, like the
is••• methods). If you feel the method needs to have a name of
does_this_and_that, it's often true that either you could have made two
methods (this and that), or eliminated one of the descriptors by utilizing
multiple dispatch (see the recent change from parse_•••(x) to parse(•••,x)
for example)

On Sun, Apr 26, 2015 at 1:29 PM François Fayard <[email protected]>
wrote:

> I don't want to ban any Julia user from using underscores in a name. But I
> think it would be nice to have consistency in the naming convention of the
> standard library. I've seen that a lot of names come from Matlab and Matlab
> happen to be (this is my advice) the worst thing that happen to the
> scientific community in terms of langage and naming conventions.
>
> But you may be right. Having the consistency of a tool such as Mathematica
> might be something that's hard to reproduce in an open source project. It's
> sad, because it is something that I do value a lot. For instance, I do work
> on C++ projects where I am alone and I am using C++ coding guidelines.
>
> That's why it should be nice to have a good "coding guideline" that is
> enforced across the Julia standard library, especially for naming
> convention.
>
> On Sunday, April 26, 2015 at 5:27:44 PM UTC+2, Tamas Papp wrote:
>
>> I am not sure that "banning" naming conventions is feasible in an open
>> source context. Also, as Scott Jones pointed out, the documentation
>> itself is not consistent.
>>
>> I prefer underscores, and I guess I will continue using them wherever
>> they make sense. Perhaps people could file an issues about very
>> abbreviated names, but IMO cholfact is OK. Naming functions is more of
>> an art than a science; style guides are useful but do not necessarily
>> lead to unambigous rules.
>>
>> Best,
>>
>> Tamas
>>
>> On Sun, Apr 26 2015, François Fayard <[email protected]> wrote:
>>
>> > I tend to prefer names with underscores, but the Julia team has decided
>> to
>> > use names without underscores. I don't want to change that but, I think
>> > many things need to be fixed:
>> > - shortnames should be banned: cholfact for instance might be replaced
>> by
>> > choleskyfactorization. Using shortnames without word separation is just
>> a
>> > nightmare. And it's not because Matlab is a mess regarding this matter
>> that
>> > Julia should imitate it.
>> > - underscores should be banned: we need consistency, and there are
>> places
>> > with underscores, some without. We could keep underscores for functions
>> > that do 2 things.
>> >
>> > Consistency is of uttermost importance in a langage with a lot of
>> functions
>> > in the standard library.
>>
>

Reply via email to