News for hackers. Stuff that matters.
Re:That's a Lot of YAML by brettermeier on Thursday September 28, 2023 @06:13AM (#37687533)
Hm, maybe it's because I'm so used to SQL, but I had to lol about the yaml example, I think it's quite nasty to read and I'm glad that SQL looks different.
Re:That's a Lot of YAML by tgv on Thursday September 28, 2023 @06:52AM (#37687793)
It can be abbreviated to

    SELECT: [num, name]
    FROM: [customers]
    WHERE EXISTS:
      SELECT: [name]
      FROM: [orders]
      WHERE:
        AND:
          - EQUALS: [customers.num, orders.customer_num]
          - LT: [price, 50]
It's not that different from formatted SQL. It's uglier, though, IMO, and more error prone. But to hate YAML for the fact that SQL looks less familiar in it, is a weird take.
Re:That's a Lot of YAML by brettermeier on Thursday September 28, 2023 @07:03AM (#37687888)
> But to hate YAML for the fact that SQL looks less familiar in it, is a weird take.

True, it's a little side hustle that's funny but doesn't necessarily make much sense.

Re:That's a Lot of YAML by throwaway46281 on Thursday September 28, 2023 @09:40AM (#37689457)
I guess the broader point they're driving at is that attempting to port familiar programming constructs to YAML DSLs will result in this kind of ugliness. If that's true though, it's a bit too subtle for my tastes.