On Fri, Aug 8, 2025 at 2:16 PM Dagfinn Ilmari Mannsåker
<ilm...@ilmari.org> wrote:
> That's because encode_json has a prototype[1], which changes how the
> argument list is parsed: no longer just as a flat list of values like a
> normal function.  Specifically, it has a prototype of '$', which means
> it only takes one argument, which is evaluated in scalar context.  So
> the first example is a syntax error, but in the second example the
> parenthesised expression is the single argument.  Becuse it's in scalar
> context, the comma is actually the scalar comma operator, not the list
> element separator, so the return value is the right-hand side of the
> comma (just like in C), not the length of the would-be list.

ron-swanson-throws-away-computer.gif

Well, thank you for the explanation. I'll make that change.

--Jacob


Reply via email to