5 ms·
Function signatures already solve that problem. We have all kinds of functions that take two numbers that mean different things (width/height, x/y, etc.). Brand
by dvt 2y ago
Function signatures already solve that problem. We have all kinds of functions that take two numbers that mean different things (width/height, x/y, etc.). Branding seems like a solution looking for a problem. I just think it's too much overhead and confusion for too little gain.
In fact, a common pattern is to pass fully-qualified objects, e.g. `dimensions = {width: number, height: number}`, which makes mixing up variables even less likely since you have to explicitly specify them.
- kristiandupont 2y ago>Function signatures already solve that problem. I literally just showed you how they don't. And you even go on to describe a pattern that makes the problem "even less likely" in the next sentence.. >Branding seems like a solution looking for a problem. You do you.