[erlang-questions] Why do we need modules at all?

Joe Armstrong erlang@REDACTED
Wed May 25 10:40:46 CEST 2011


On Wed, May 25, 2011 at 7:58 AM, Vance Shipley <vances@REDACTED> wrote:

> Joe,
>
> I love the idea of ditching modules files and storing functions
> in a data store.  What I'm picturing though is that the functions
> are stored in their abstract syntax form (i.e. data) so that the
> issue of formatting standards is stripped away.  You need tools
> which translate it in and out so that we can continue to use the
> editors we are familiar with but you can edit in emacs using it's
> bizarre indentation and I can use vim and indent with tabs.  ROK
> can put seperators at the begging of lines, I'll see them at the
> end.
>
> I have long wanted to put a toolchain together which allowed me
> to easily store abstract syntax in the source code control system
> repository.  The check in and check out processes would convert
> (pretty print) it to my personal prefernce settings.
>
>
YES


> The problem with that plan seems to be with the preprocessor.  It
> seems to me though that your plan suffers the same problem.  If
> macros are defined at a module level, or in an include file, you'll
> have to deal with them when you pull the functions out of the module
> and stuff it into the data store.  The extended syntax tree used in
> the erl_syntax application might be the answer.
>

YES



>
> How do you deal with record definitions?
>
>
YES :-) - compile their hash into the function?


> --
>     -Vance
>
> On Tue, May 24, 2011 at 10:08:40PM +0200, Joe Armstrong wrote:
> }  Silly design question: if multiple people can edit (say) a wiki
> }  of functions what formatting standards should be enforced?
> }
> }     - the last person who edited the text
> }     - some "moderator" (who)
> }     - by a pretty printer
> }      (is there a *really good* pp? - with color syntax marking)
>
> --
>         -Vance
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110525/d1e390b0/attachment.htm>


More information about the erlang-questions mailing list