dhh1128 / intent

the intent formal language
https://intentlang.org
2 stars 1 forks source link

Support infix notation on params and args to a verb #57

Open dhh1128 opened 10 years ago

dhh1128 commented 10 years ago

classic definition:

Take vehicle to junkyard:
    takes:
        - vehicle
        - junkyard
    code: ...

With invocation like this:

if (Price is reasonable(proposed)):
    Take vehicle to junkyard(my car, your junkyard)

Possible infix def:

Take (vehicle) to (junkyard):
    code: ...

With invocation like this:

if (Price (proposed) is reasonable): // no need for trailing () on invocation; can be terminated by traling ) or . or :
    Take (my car) to (your junkyard)