[erlang-questions] Similarities between web programming and functional programming
Wed Jun 16 05:01:05 CEST 2010
Good points, do you any Erlang web framework doing this right now? Especially I liked the idea of a web form represented as a partial function. I am not sure I understood the concurrency-oriented style is more feasible for web programming part in your response. Do you mean actors as a way to handle http requests?
On Jun 14, 2010, at 11:27 AM, 黃耀賢 (Yau-Hsien Huang) wrote:
> On Sun, Jun 13, 2010 at 4:19 AM, Nilanjan Raychaudhuri <
> > wrote:
>> Hi all,
>> As a newbie into functional programming I am curious to know how functional
>> programming style fits into building web applications? And how it
>> compares to building web apps in Ruby or Java.
>> Any pointer to article/literature will be helpful.
> In general, subjects in Functional Programming may be:
> * Value is function, and anything is value.
> * Immutable value.
> * Lazy evaluation strategy, and what about that when some but not all
> arguments are
> given to a function you get another function. (I forgot terms about the
> later one.)
> * Higher order function.
> * Pure function, or imperative, with side-effect.
> How does it fit Web Programming? In my opinion,
> 1. Anything is value, yes, some techniques and paradigm of Web Programming
> as that about XML technologies follow this style. XSLT can be written
> Parts of web technology are not Software Engineering any more but Data
> 2. Immutable value means that program runs without depending on state.
> .Net Framework tried making the stateless Web environment stateful. In
> programming, when you send a different request, the program generates
> set of values instead of making a response with a modified state.
> 3. Partial application of function arguments is powerful than other
> programming styles.
> Consider a web form as a function that it accepted some of it arguments
> `became' another function, that is, another web form or the original form
> some arguments and waiting for other arguments.
> 4. High order function plays role of glue. Web Programming is performed in
> you and your colleagues write each's programs, and you put those
> and those works as a whole. High-order function do somethings similarly:
> Functions may be glued by some function, and those work as a whole while
> each can be run separately for the debugging purpose.
> You post the question in Erlang mailing-list. About Erlang, its
> Programming style is more feasible for Web Programming and more discussible
> than functional programming features.
> Best Regards,
> Y.-H. H.
More information about the erlang-questions