Module functors vs. records-of-functions for interface/implementation separation

your last example here is actually incredibly cool of its inner workings, although using strings feels kinda meh, but on the other hand as i’m exploring module functions for DI, that syntax is becoming incredibly verbose as well so…

Strings for the property access?

yeah, exactly, it it doesn’t look too nice but turns out module functions don’t either (tbh it seems like the Module Function syntax has sort of been forgotten about with regard to how fresh the rest of the language feels, and the formatter does some crazy maneuver with Module Function syntax too)

What would be better for access? A variant?

i had dot-syntax i mind like ctx.log

CCA is my employer’s company name. Or “Control Center Apps” in full.

2 Likes