[erlang-questions] New module syntax and semantics?
Ulf Wiger
ulf@REDACTED
Sun Jun 29 23:34:09 CEST 2008
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
>
More information about the erlang-questions
mailing list