Bentok
banner
bencope.land
Bentok
@bencope.land
Software engineer by day, hobbyist game dev by night, husband, dad, tend to be hanging around F#, Typescript and Swift stacks these days. Love F#, Godot, games, anime, haiku, oolong and kukicha, nature. 🎮🍵🌳🦔

The opinions expressed here are solely my own.
It almost makes it embarrassing to use FP/immutable styles in C#. I was found myself thinking “the team is going to hate this code,” even though it’s literally how the code must be written.
December 10, 2025 at 1:55 PM
Rubio is a wasteful diversity move.
December 10, 2025 at 3:17 AM
Cheers to that! 🍻
December 8, 2025 at 8:21 PM
Forgot to tag @dzoukr.cz since the post calls out the excellent Dapper.Fsharp library.
December 8, 2025 at 7:38 PM
That’s cool to hear. It’s nice to know other people are in your shoes; it can feel like you’re on an island sometimes.

Are y’all going to try to cut out the C# eventually or will you keep the 50/50 split?
December 8, 2025 at 7:37 PM
Nice!

This post does a better job at explaining kind of how we do translations if you are interested. It’s probably too barbaric for your situation though lol.

We rely heavily on Microsoft.FsharLu.JSON which has this compact serialization technique built in.

blog.bencope.land/cross-bounda...
Cross-Boundary ADTs
Modeling a domain with algebraic data types (ADTs) is a powerful, expressive way to design code that is both concise and readable. Too often, code that does too little with too many lines negatively i...
blog.bencope.land
December 8, 2025 at 6:44 PM
Yup! It’s the | operator, but you just add a tag (in the screenshot, it’s “state”). As long as the tag is in each type and is a literal value, the TS compiler is smart enough to know what keys are on the object. It goes pretty far for making the domain explicit on the FE.
December 8, 2025 at 6:40 PM
This basically makes F# the point of truth though, I suppose. The other systems have conventions that give deference to the F# system (which works well in our situation).
December 8, 2025 at 6:29 PM
Basically what we do there is on deserializing the payload, we do a conversion to whatever the language’s natural ADT type is (discriminated unions in TS, and enums in Swift). Sort of a translation layer that lives at the boundary.

Then F# naturally deserializes to a DU if the JSON structure works
December 8, 2025 at 6:27 PM
I haven’t followed C# in a little more than a year now, but last I saw it didn’t seem like unions would be very similar to F#.

My gut reaction here would be to do compact serialization of DUs (where tag values are the keys) and deserialize it in C# the same way we do with TS and Swift.
December 8, 2025 at 6:25 PM
Not sure how valuable a study is that polls people who didn’t vote after a winner was already determined. I’m sure a sociologist or psychologist would know better than me, but it seems obvious there’d be a strong implicit bias to not say you voted for the loser.
December 7, 2025 at 3:08 PM
I feel like it’s maximum unfortunate any time FAANG gobbles up anything. :(

But it does lift my spirits a bit that you see some possible silver lining.
December 5, 2025 at 1:20 PM
Oh no. :(

RIP. They say his audition for Shang Tsung was truly epic. Such a passionate guy, and a class act.
December 5, 2025 at 3:11 AM
Ooh Rain World has such a cool vibe.
December 4, 2025 at 1:21 AM
When I was young we’d drive from Taylorsville to the one in Statesville NC, it was great as a kid because you could always go straight to your favorite food.
December 3, 2025 at 5:39 PM