Scala and C# Approaches to Union Types

I’ve been learning Scala lately, and it turns out that scala union types are sometimes implemented the same way I discovered unions could be imitated in C#.

June 1, 2023 · 3 min

F# Sneaky Construction vs Initialization Issue

I rarely worry about constructors or initialization in F#. But, every once in a while, the difference is important.

May 25, 2023 · 5 min

Data Inheritance is Unnecessary

In short, I’ve been using F# for several years now and didn’t realize that F# record types can’t be inherited. I think this demonstrates that inheritance for data types is unnecessary when actions and data are separated, and it may hint at a larger trend in programming languages.

May 18, 2023 · 3 min

Late-bound inheritance vs Function Composition

I heard Go had late-bound inheritance and was excited to see how that would effect my coding. Instead I found that I already achieve the same kind of value in F#, just in a different way.

April 20, 2023 · 4 min

Why No Traits (late-bound inheritance) in F#

I fooled myself for a moment into thinking F# has ad-hoc polymorphism. Interface inheritance in F# looks a lot like traits in rust. So, why doesn’t F# support trait-like polymorphism.

May 6, 2022 · 3 min

Small Quibble with The Great Rewriting in Rust

The Great Rewriting in Rust is a good overview of why Rust is a compelling and growing language. However, I have a small quibble with how it refers to F#. The article states F#, Dart, Swift, or Kotlin either, which seem to be more interested in replacing the null keyword with optionals, thereby solving Sir Hoare’s mistake. Sir Hoare’s mistake refers to null. I can’t speak to Dart, Swift, and Kotlin, but I know F# rather well.

April 29, 2022 · 3 min

Theory: Dependency Injection Scheme is Determined by Responsibility Layer

Scott Wlaschin posted an incredible series on dependency injection. It clarifies the different techniques and cases where each is useful. I noticed an interesting relationship between the techniques and the layers I use to categorize services.

October 24, 2021 · 3 min

Test Api in F# Improved

I previously wrote on the Test API behavioral testing in F#. More time and thinking has brought about a few key improvements, making the pattern both more concise and standardized.

October 8, 2021 · 5 min

Program Structure is not File Structure

Naming is one of the most important activities in programming. Names are the primary vehicle for communicating intent and making code understandable. Names haves some sneaky counterparts: scope and context. I argue that our tools for scope and context impact how good our naming can be, and file-based modules force coupling between concerns that inhibit global name organization.

October 1, 2021 · 6 min

Clojure Namespaces Inhibit Code Grouping

I’ve spent most of this year in Clojure after years of .NET. Much of my F# design skills made the jump, but one language difference has notably changed how I write programs. Specifically, two namespacing choices inhibit my inclination to explicitly group small sections of related declarations. This broadly impacts both program structure and naming.

September 24, 2021 · 4 min