News for hackers. Stuff that matters.
Re:Datomic Is Now Free by tyre on Thursday April 27, 2023 @03:31PM (#35733383)
“No real gain”

I don’t agree with this. iirc Rack ultimately uses and array to represent HTTP responses. It has three members: the status code, the headers, and the response body.

If you’re shipping a new change, is it easier to mistake response[0] or response.headers?

This is a trivial example, but the general class (ha) of trade-off is amplified with more complex objects.

I love clojure and lisp but the blindness behind a statement like “no real gain” has always kneecapped adoption.

Re:Datomic Is Now Free by augustl on Thursday April 27, 2023 @04:00PM (#35733753)
In Clojure, response.headers is still data :) You just use the built-in ways of reading named keys, such as (:headers response) or (get headers :response).
Re:Datomic Is Now Free by augustl on Friday April 28, 2023 @03:43AM (#35738610)
Errata: (get response :headers)
Re:Datomic Is Now Free by outworlder on Thursday April 27, 2023 @06:07PM (#35735176)
> If you’re shipping a new change, is it easier to mistake response[0] or response.headers

False dichotomy. There are many options other than arrays. Clojure in particular is fond of hashmaps. You can have your response.headers without OOP.