[erlang-questions] New module syntax and semantics?

Juan Jose Comellas juanjo@REDACTED
Tue Jul 1 16:36:47 CEST 2008


An does anybody know what would it take to make this feature
official/supported? It is really useful in some cases.


On Sun, Jun 29, 2008 at 6:34 PM, Ulf Wiger <ulf@REDACTED> wrote:

> That's an example of parameterized modules, which is an experimental
> and unsupported feature in Erlang.
>
>
> http://www.planeterlang.org/story.php?title=The_black_art_of_Erlangs_parameterized_modules
> http://www.erlang.se/workshop/2003/paper/p29-carlsson.pdf
>
> BR,
> Ulf W
>
> 2008/6/29 Tom Ayerst <tom.ayerst@REDACTED>:
> > Is was looking at the mochiweb code and I saw some oddities.
> >
> > firstly the module statement:
> > -module(mochiweb_request, [Socket, Method, RawPath, Version, Headers]).
> >
> > In the use of mochiweb I can see things like Req:get(method).
> >
> > This looks more like an object method call, is this new?  I cannot see an
> > docs about it.
> >
> > Thanks for any info.
> >
> > Tom Ayerst
> >
> > In the example Req ={mochiweb_request,#Port<0.142>,'GET',
> >                                          "/",
> >                                          {1,1},
> >                                          {9,
> >                                           {"host",
> >                                            {'Host',"127.0.0.1:8888"},
> >                                            {"accept",
> >                                             {'Accept',
> >
> > "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"},
> >                                             nil,
> >                                             {"accept-language",
> >                                              {'Accept-Language',
> >                                               "en-gb,en;q=0.5"},
> >                                              {"accept-encoding",
> >                                               {'Accept-Encoding',
> >                                                "gzip,deflate"},
> >                                               {"accept-charset",
> >                                                {'Accept-Charset',
> >
> > "ISO-8859-1,utf-8;q=0.7,*;q=0.7"},
> >                                                nil,nil},
> >                                               nil},
> >                                              {"connection",
> >
> {'Connection',"keep-alive"},
> >                                               {"cache-control",
> >
> > {'Cache-Control',"max-age=0"},
> >                                                nil,nil},
> >                                               nil}}},
> >                                            {"user-agent",
> >                                             {'User-Agent',
> >                                              "Mozilla/5.0 (Windows; U;
> > Windows NT 6.0; en-GB; rv:1.9) Gecko/2008052906 Firefox/3.0"},
> >                                             {"keep-alive",
> >                                              {'Keep-Alive',"300"},
> >                                              nil,nil},
> >                                             nil}}}}
> >
> > _______________________________________________
> > erlang-questions mailing list
> > erlang-questions@REDACTED
> > http://www.erlang.org/mailman/listinfo/erlang-questions
> >
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080701/bd42db17/attachment.htm>


More information about the erlang-questions mailing list