Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I am not sure why the original blogger thinks web programming is any different from any other type of programming. In a web app, we do:

    handleRequest :: HttpRequest -> AppState -> (AppState, HttpResponse)
In a GUI desktop app, we do:

    handleEvent :: Event -> AppState -> (AppState, [WindowUpdates])
(The AppState is stuff like your config files, or database connections, etc., etc. You have some state in your function, you change it, and then the next invocation of your function uses the new state. You might not always write that explicitly, but it's how you think about it.)

The only difference here is in the format of the "input" and "output". Inside, we use the same programming techniques. We solve the same complex problems, and produce the same valuable results.

(But not, he's right, I don't use UML diagrams and multiple inheritance. There are much sharper tools available to me.)



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: