Moving the kernel to modern C
Moving the kernel to modern C
Posted Mar 4, 2022 14:36 UTC (Fri) by dvdeug (guest, #10998)In reply to: Moving the kernel to modern C by wtarreau
Parent article: Moving the kernel to modern C
= or + doing database requests is insane, but so is naming the function f() or add() or shelia(). I was not familiar that any dynamically typed language had operator overloading; in a statically typed language, the types of a, b and c would have made automatic renaming possible. Clarity of naming is important, and I'd argue that there's a conservation of information; the more ambiguous the types, the more explicit the function naming needs to be to compensate.
> The only thing it provides is ease of *writing* code
One of the recent Scheme additions was writing (add (times a c) b) as {a * c + b}, because it actually is easier to read code like that, and
"hi " + name.toString + " and good morning"
is also easier to read than
"hi".append(name.toString).append ("and good morning")