After 10+ years of programming in the same language, you begin to see patterns that break. One of my biggest issues has always been the need to comment complex tasks. This problem boiled in my mind for awhile. Wondering, how could I solve this?
I came up with the solution, but it took awhile. What if you could actually code closer to something like the English speaking language. What If I could type like I thought? Reading it back would be extremely inuitive!
Looking at all possible ways to do this, I came up with a few solutions. Maybe forgo it for something visual? Nah, because I wanted to be able to code that visual stuff more intuitively as well. I thought about creating my own parser for text, but that would be slower, and take a lot more work for each thing in the library. Then I stumbled onto the Fluent Design pattern again. Not something I always think about, but it seemed to do everything I wanted.
Using a series of very lightweight structs, we could connect each word more inuitively. I found I didn't need to comment my work, where the chained methods were located. I also found a super rewarding byproduct of this method. NO MATH! Now I am good at math, but I sure wish I could be more flexible with my code. First and foremost, I think like an artist, not like how I assume most coders think. That has always made code feel overwhelming.
To give you an idea of how this works, we can express it with this fancy little gif. I think showing the snapping of a transform to a surface, is the best way I could illustrate it at this time. It is one thing where there is a decent amount of math involved, but on the surface, you see NONE!