[erlang-questions] code garbage collector

Joe Armstrong erlang@REDACTED
Wed Oct 5 11:41:12 CEST 2016

On Wed, Oct 5, 2016 at 10:09 AM, Kostis Sagonas <kostis@REDACTED> wrote:
> On 10/05/2016 09:54 AM, Joe Armstrong wrote:
>> I want the *opposite* of "including a dependency" but rather a tool that
>> garbage collects code reducing it to a minimal program.
> I doubt that something like that exists.  Note that Erlang is not just a
> higher-order language where you need to do a complicated analysis, but it is
> also language that also allows something along the lines of:
>   % foo/3 is an exported function (called with some constructed lists)
>   foo(L1, L2, Args) ->
>     M = list_to_atom(L1), F = list_to_atom(L2), apply(M, F, Args).
> Of course, writing an analysis that is effective if no such cases exist or a
> conservative analysis that protects itself from such cases is doable.  But
> you need to base it on a "closed-world assumption" of some sort.

Agreed - but code like the above should really not be hidden away in the
middle of a module but be in a special module reserved for foul smelling code.

All I want to do is extract all the callable code from a given start point
and stop the extraction when I hit OTP library code, or nasty smelling code.


> Kostis
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions

More information about the erlang-questions mailing list