5 ms·
> it's intended to minimize foot-guns to lower the error rate when generating Mog code. This is why Mog has no operator precedence: non-associative operations h
by mkl 7mo ago
> it's intended to minimize foot-guns to lower the error rate when generating Mog code. This is why Mog has no operator precedence: non-associative operations have to use parentheses, e.g. (a + b) * c.
Almost all the code LLMs have been trained on uses operator precedence, so no operator precedence seems like a massive foot-gun.
- NewsaHackO 7mo agoI agree. But also, do people rely on operator precedence when coding? I just automatically use parentheses in general.
- Bootvis 7mo agoAlso for a * b + c ? I know clang tidy wants me to do this but I think it is overkill.
- NewsaHackO 7mo agoI would usually. Sometimes if it's like 2 * x + b, I would not, but personally, I hate chasing down bugs like this, so just add it to remove ambiguity. Also, for like b + 2 * a, I will almost always use parentheses.
- reverius42 7mo agoNot sure that matters when the entire language spec is expected to be part of every context window? The LLM should be capable of using the language spec to express intended precedence.
- disconcision 7mo ago> so no operator precedence seems like a massive foot-gun how do you mean? given that spec, ambiguous code just won't compile. that could potentially be inefficient, but not a foot gun.