Elektrine lite

← Feed

@randomwizard@social.vivaldi.net

Post #2933571

2026-05-27 20:48 UTC

I like functional programming, even though I am not very good at it (based on some of the cool code I have seen from others). But sometimes I will see a functional programmer write something like orders .filter(valid) .map(enrich) .groupBy(customer) .map(calculateTotals) And I think, I would have done that in SQL SELECT customer_id, SUM(total) FROM orders WHERE valid = true GROUP BY customer_id; Many years ago, I use to have to maintain a large ColdFusion application. ColdFusion is a terrible language in my opinion, but it did have some interesting features. Like you could pop data in a cfquery and then query the query, so it was a bit like having a db engine embedded in the programming language. You can do something similar in php if it has the sqlite extension, by creating the table in memory $db = new PDO('sqlite::memory:'); but there is a bit of typing out ceremony to insert all the data into the table.

Replies (0)

No replies.