Dec. 1st, 2022

isaacschemm: Drawing of myself as a snail (snail)
[personal profile] isaacschemm

Sometimes I need to take a version number - something like 5 or 6.4 or 2.25.1 - and see whether it's newer or older than another version number, or maybe just take a list of version numbers like this and put them in order.

The projects I'm working on usually have at least a bit of F# code, or a dependency on an F# library (even if most of the code is C#), and once I've taken the dependency on FSharp.Core, I might as well use it to create an equatable, sortable, and immutable "version number" type.

This might be absolute favorite line of code:

type ProductVersion = { components: int list }
Read more... )
Tags:

Snail#

A programming blog where the gimmick is that I pretend to be a snail.

Expand Cut Tags

No cut tags

Style Credit

Page generated Sep. 23rd, 2025 09:34 am
Powered by Dreamwidth Studios