Need some reasons to persuade me to use racket web rather than others eg python flask

I know it's cool to use racket but is there any advantage than other web server?

1 Like

My background is over 20 years of Python and of that about 5 years in web backend development. I haven't worked with Racket web frameworks so far.

The reason I work with Racket (so far only in private projects) is that I enjoy programming with it. I like functional programming and how the language features of Scheme/Racket and the resulting code compose. (Of course the language isn't perfect, but then, no language is. :slight_smile: )

So even though I can't answer your question about Racket web programming specifically, I hope my reply still helps.

1 Like

Seeing no other replies, I'll jump in with a semi-educated point of view.

Racket's web servers brought a bunch of PL-ish thinking to web servers, with a number of ideas that were either new or new-to-web-servers, IIRC.

The first big thing was the recognition of the link between web forms and continuations; specifically, that a server-side application requesting input from a user was essentially a continuation capture. The racket web server leverages this by using continuations to represent suspended operations.

It appears to me (correct me if I'm wrong!) that this solution does have at least one important drawback, in that the server's representation of continuations was not very small, and retaining many continuations could be expensive, memory-wise.

Bringing in more PL knowledge, the "stateless" web server performs a CPS-like transformation on your code to ensure that the continuation has a nice compact form that can easily be stored.

There may be (indeed, there almost certainly are) other interesting things to say about the web server, these are the two that occur to me.

@jeapostrophe probably has information to add to this.

2 Likes

Oh! Just saw this post on another thread, extremely relevant:

1 Like