I would love this feature as well.
"Lee Finn" <lsfinn+mw@psu.edu> wrote in message <fdp336$4ri$1@fred.mathworks.com>...
> A query:
> Only functions in the parent directory can call functions in a private directory.
> Why not also allow functions in the private directory call other functions in the
> same private directory? E.g., if A.m and B.m, why not allow B to call A?
> The upside of allowing this is to increase the opportunities for code
> factorization: e.g., if A and B both have need to perform the same function C, it
> is better practice to break C out into its own file C.m then to repeat it as a
> subfunction in both A.m and B.m.
> I have been unable to think of any downside; thus, my question.
>
> Thanks all,
>
> Sam
"Lee Finn" <lsfinn+mw@psu.edu> wrote in message <fdp336$4ri$1@fred.mathworks.com>...
> A query:
> Only functions in the parent directory can call functions in a private directory.
> Why not also allow functions in the private directory call other functions in the
> same private directory? E.g., if A.m and B.m, why not allow B to call A?
> The upside of allowing this is to increase the opportunities for code
> factorization: e.g., if A and B both have need to perform the same function C, it
> is better practice to break C out into its own file C.m then to repeat it as a
> subfunction in both A.m and B.m.
> I have been unable to think of any downside; thus, my question.
>
> Thanks all,
>
> Sam