<br><br><div class="gmail_quote">On Tue, May 24, 2011 at 2:05 PM, Tim Watson <span dir="ltr"><<a href="mailto:watson.timothy@gmail.com">watson.timothy@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">> But plain module namespace is also ok. It would be impossible for me<br>
> to work with 30K LOC with plain function namespace.<br>
<br>
</div>I think what Joe is getting at - he'll correct me if I'm wrong about<br>
this - is to refer to functions not only by name, but by other<br>
metadata as well. I'm not sure what this looks like empirically, as<br>
like you I can't see how using only function names you could work with<br>
a flat namespace. Looking up functions by other (additional) metadata<br>
such as type signature, author, date, company, category (mutiples?),<br>
pre/post conditions, safe guarantees, etc - that would work. In fact<br>
if you think about a process engine (such as BPMS solutions and the<br>
like) then process (i.e., function) is often selected dynamically<br>
based on many attributes, not just name.<br></blockquote><div><br>Yes - how this would work I don't know - my Haskell friends say that searching for<br>function by type signatures is good.<br><br>What do I do today when I suspect that somebody has written some code ?<br>
<br><br> 1) will it take me < ten minutes to write the code?<br> yes - write it<br> 2) google or ask a friend<br> 3) this gets me to git or sowhere<br> 4) search<br> 5) cut-and-paste<br><br>Not a good method - and this is *best practise*<br>
<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
Just how this will work in practise as a replacement for existing<br>
(shall we say normal) way of referring to a function that is in a<br>
module, I could not say. But it is an interesting concept. Perhaps<br>
using a URI as the name and thereby being able to have multiple URIs<br>
representing the various different category-based paths to identify<br>
the function - the "aliases" could then redirect to the direct,<br>
uniquely named resource which would in turn return the function<br>
metadata (and binary code presumably).<br></blockquote><div><br>Something like this.<br><br>Actually for development it would be great to say<br><br> -import("<a href="http://a.b.c/modname">http://a.b.c/modname</a>", [foo/2]).<br>
<br>this would just make an rcp to foo/2 on the remote host and save all the pain of locally installing<br>the necessary code on my machine.<br><br>/Joe<br><br><br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><div></div><div class="h5">_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</div></div></blockquote></div><br>