• he/him

real official verified page of Bekoha (real) at cohost dot org

You must log in to comment.

in reply to @trashbang's post:

I'm morbidly curious why they decided to have the precedence of the unary minus operator so low.

It's been a while since I've last thought about parsers, but is there some way this simplifies implementation of parsing mixed unary & inline binary operator expresssions? It feels like it shouldn't.

I learned just enough about parsers to pass the unit and haven't really thought about them since, I'm afraid.

I wouldn't put too much stock in there being a well-considered decision behind it. This language has a lot of quirks.

I am reminded of the time I caught a bug in my studio's prototype game where mouse deltas were being calculated as

Position =+ mouseMovement

Instead of

Position += mouseMovement

Unary plus might be one of the most cursed operators. Just hiding there waiting to ruin someone's day.