News for hackers. Stuff that matters.
Re:Structured Logging with Slog by masklinn on Wednesday August 23, 2023 @05:17AM (#37233551)
Also funny story: in Perl “,” can be spelled “=>” specifically for this sort of use cases, when you write

    my %hash = (
        Foo => “bar”,
        Baz => “qux”,
    );
the behaviour is no different than

    my %hash = (
        Foo, “bar”,
        Baz, “qux”,
    );
it’s just that a literal plist in a hash context is interpreted as a hash.

Hence “=>” being called “fat comma” in perl.

Which means you can writer

    my %h = (a => b => c => d);
or

    my %h = (a, b => c, d);

they all mean the same thing.
Re:Structured Logging with Slog by richardwhiuk on Tuesday August 29, 2023 @10:07AM (#37308183)
That all sounds questionable.