# Defining my own invisible operator

There are some invisible operators in Mathematica (\[ImplicitPlus],\[InvisibleTimes],\[InvisibleComma],\[InvisibleApplication]). How can I make my own that would not interfere with built-in functions (Plus,Times,Sequence,Apply)? Is there some invisible character like those different kinds of spaces (\[RawSpace],\[ThinSpace],\[VeryThinSpace], etc.) that won't be interpreted as multiplication, so that I can define my own patterns and behaviour with it?

EDIT: OK, I think this is it:

TemplateBox[{}, "op",
InterpretationFunction :> (RowBox@{"~op~"} &),
DisplayFunction :> (RowBox@{"\[InvisibleSpace]"} &)];
SetOptions[EvaluationNotebook[], InputAliases -> {"op" -> %}]
SetAttributes[op, Flat];


Now if I type 1[ESC]op[ESC]2[ESC]op[ESC]3 it will be interpreted as 1~op~2~op~3 which means op[1,2,3] if op has Flat attribute, but will be displayed as 123.

I wonder why nobody came up with it, what all the gurus doing?

Whatever, now I can finally create pretty EDSLs in Mathematica :D

-
–  Öskå Feb 13 '14 at 10:40
@Öskå Yes, basically I need an invisible infix operator of my choice. –  swish Feb 13 '14 at 10:44
An operator like that will be endless fun when debugging. –  Yves Klett Feb 17 '14 at 7:03
@YvesKlett \[InvisibleBug] ! –  belisarius Feb 18 '14 at 5:08
@belisarius hehe plenty of those already :-) –  Yves Klett Feb 18 '14 at 6:22