Calling internal functions - foo::bar() ?
Mon Mar 7 15:01:53 CET 2005
--- Vlad Dumitrescu <vlad_dumitrescu@REDACTED>
> From: "Thomas Lindgren" <thomasl_erlang@REDACTED>
> > Note that you can handle this by a simple
> > transformation.
> That's a nice idea.
I regret I didn't think of it first :-)
> However, I am not convinced that exposing internal
> functions is a good idea. If
> it is a good idea, then why not remove -export()
> completely, and use any
> optimizations to all intra-module calls?
Well, the previous optimization only shows there is no
real need to forbid :: on grounds of performance.
Introducing :: may, as you say, still be a bad idea.
I find myself wavering on that issue: on one hand, you
may be right in that it's hell on maintenance; on the
other hand, I still find it preferrable to
xref and similar tools could detect anomalies either
way, either by looking for :: or by disregarding
export_all and warning about calls that do not use
explicitly exported functions.
> My personal feeling is that testing internal
> functionality should be done by
> using (exported) test functions. This has its own
> drawbacks of course, but it
> feels better on the whole.
Well, that's another reasonable argument for avoiding
::, at least as part of the language (rather than as a
(Finally, on the gripping hand, there might be yet
another, superior approach to the problem somewhere.)
Celebrate Yahoo!'s 10th Birthday!
Yahoo! Netrospective: 100 Moments of the Web
More information about the erlang-questions