Pythy icon indicating copy to clipboard operation
Pythy copied to clipboard

Improved syntax?

Open alfC opened this issue 13 years ago • 2 comments

Can the syntax be improved to make the following example work?

AUTO_PYTHY(min)(x, y)(
    return x < y ? x : y; 
)

alfC avatar Mar 12 '13 05:03 alfC

I don't think thats possible, since the name and the arguments need to be used in multiple places. In the future, I may support syntax like this:

$(pythy(min)(x , y))
(
    return x < y ? x : y;
)

pfultz2 avatar Mar 13 '13 07:03 pfultz2

Seriously?, how is it possible to make use of the "$" character in C++ syntax? Thanks for the great work.

alfC avatar Mar 14 '13 18:03 alfC