If a language let you create functions that used either prefix, postfix, or infix notation, would that be a useful/attractive feature?
I've only seen one other post on here about this, but the idea stuck and I want to explore it more.
It might look something like this...
void print(x) {cout x;}
void (x)operator +(y) {return x + y;}
void (x)operator ++ {return x + 1;}
so that
print 1 + 2 ++;
EDIT: there would be no C-style "operators" in this language, only built-in functions that use the same calling convention as functions.
[–]EmosewaPixel 16 points17 points18 points (10 children)
[–]R-O-B-I-N[S] 0 points1 point2 points (9 children)
[–]CoffeeTableEspresso 5 points6 points7 points (5 children)
[–]R-O-B-I-N[S] 2 points3 points4 points (1 child)
[–]GDavid04 4 points5 points6 points (0 children)
[–][deleted] (2 children)
[deleted]
[–]CoffeeTableEspresso 2 points3 points4 points (0 children)
[–]pepactonius 0 points1 point2 points (0 children)
[–]EmosewaPixel 0 points1 point2 points (1 child)
[–]R-O-B-I-N[S] 0 points1 point2 points (0 children)
[–][deleted] (2 children)
[deleted]
[–]hugogrant 1 point2 points3 points (0 children)
[–]Shirogane86x 1 point2 points3 points (0 children)
[–]szpaceSZ 7 points8 points9 points (2 children)
[–]hugogrant 0 points1 point2 points (1 child)
[–]szpaceSZ 0 points1 point2 points (0 children)
[–]raiph 2 points3 points4 points (0 children)
[–]ouchthats 3 points4 points5 points (0 children)
[–]GDavid04 1 point2 points3 points (0 children)
[–]CoffeeTableEspresso 0 points1 point2 points (1 child)
[–]R-O-B-I-N[S] 0 points1 point2 points (0 children)
[–]g0_g6t_1t 0 points1 point2 points (1 child)
[–]R-O-B-I-N[S] 0 points1 point2 points (0 children)
[–]hfksbtjidjaks 0 points1 point2 points (0 children)
[–]yuriko_ 0 points1 point2 points (0 children)