3 ms·
Maybe you would like UFCS: https://en.wikipedia.org/wiki/Uniform_Function_Call_Syntax https://en.wikipedia.org/wiki/Uniform_Function_Call_Syntax e.g. Nim has i
by shiomiru 3y ago
Maybe you would like UFCS: https://en.wikipedia.org/wiki/Uniform_Function_Call_Syntax https://en.wikipedia.org/wiki/Uniform_Function_Call_Syntax
e.g. Nim has it, and it lets you do this:
proc add(self: MyList, e: int) =
# [insert append code here]
mylist.add(1) # equivalent to
add(mylist, 1)
Though I'm not sure how well it would work with C, considering it lacks
function overloading.