CACI-International / ergo

The ergo language and runtime.
MIT License
2 stars 2 forks source link

Consider some form of limited infix for boolean logic #15

Open calebzulawski opened 1 year ago

calebzulawski commented 1 year ago

I think allowing arbitrary infix function calls is probably wrong, but would be appropriate for some built in operations.

For example:

match std:env:os [
    linux -> $linux-value
    _ -> $otherwise
]

vs

if (std:env:os == linux) $linux-value else $otherwise

(yes, std:equal exists, but that somehow feels even less idiomatic than match)