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

Edmond Begumisa ebegumisa@REDACTED
Wed May 25 12:31:05 CEST 2011


On Wed, 25 May 2011 06:23:38 +1000, Joe Armstrong <erlang@REDACTED> wrote:

> On Tue, May 24, 2011 at 10:02 PM, Vlad Dumitrescu  
> <vladdu55@REDACTED>wrote:
>
>> One thought: modules as grouping of functions and as a unit of loading  
>> are
>> a way to ensure that a set of functions are consistent with each other,
>> relative to some data the they can work on. This is important. Whatever
>> replaces them should still fullfill that requirement.
>>
>> regards,
>> Vlad
>>
>>
>
> Absolutly. I'm working on the idea of flows.
>
> A flow is a list of flows or grains
>
> A grain is an atomic thing
>
> A module is basically a flow where the grains are functions.
>
> A novel is a flow of " chapter flows" a "chapter flow" is a flow
> of paragraph grains etc.
>
> An image gallery is a flow of image grains.
>
> Everything is a flow or a grain.
>
> I'm wriiting a folding editor in javascript to support editing/organising
> flows
>
> I made a weak minded attempt at this
> see
> https://github.com/joearms/elib1/tree/master/unsupported/folding
>
> In this directory are some rudimentary folding editors
> test_js6.html and experiment.erl are fun.
>
> (( If anybody reading this is an ace javascript hacker and wants to help
> please mail me -- I know *exactly* what help I need))
>
> My first goal is to segement modules into flows and
> put them into a web based flow editor.
>
> All the flows will be in a global database.
>
> One thing I missed saying - associated with each function is
> *research* (NOT documentation) I want to store all reserach notes
> necessary to write the function along with the function in a hidden fold
> this should contain text, PDFs images etc. - the lot.
>
> Often the research to write 100 lines of codes takes weeks
> and we throw all this away - this must be stored
> with the code (NOT linked, store a copy, the link might be
> dead years later)

All my projects have a "research" folder! It contains files (NOT LINKS) of  
the nature you describe. It also contains text files with notes and ideas.  
And it's always a subdir of the "src" folder so that it's given the same  
priority as source files (version controlled and backed up.)

- Edmond -


>
> /Joe


-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/



More information about the erlang-questions mailing list