Live data from Hacker News

Abstraction, not syntax

ruudvanasseldonk.com

61–67 of 67 posts

Re: Abstraction, not syntax

#61

I got confused reading this because I wasn't sure how I, as a reader with no knowledge of the system under discussion, was supposed to know that all the buckets should be in the same region. Nor is it clear to me how the "for loop" version would handle the case where exceptionally one bucket is different. Which is a more interesting discussion imho, that's the whole point of having it as a configuration field, after…

The example in the article shows a need for cartesian product of (bucket name) and (lifetime policy), with a fixed location. Nothing stops you from defining a separate category for the exceptions, and just append them to the resulting list. Or you may want to assign each bucket its own location, then you define it along side the bucket name.

Re: Abstraction, not syntax

#63

FOR loops? YAML has a merge key The merge key is a clever little trick, but it depends of the special hash key, so lists can’t be merged. Syntax does matter, which is why YAML matters — even if imperfect.

Merges and anchors are some of the least maintaineable and most error-prone config i've seen.

Doesn't help every yaml parser has their own opinion on what a merge or an anchor should do, exactly.

Re: Abstraction, not syntax

#66
post #7

I don't think the title and the article really communicates it's case well. Did not understand the goal until 90% through the article when they showed the source code of RCL with the loops. This isn't syntax vs abstraction. This is how much programming language power do you want to enable in your configuration language. This is a big difference and I think we miss the interesting part of that discussion because we di…

I think if people want a more powerful, programmable config language, maybe they should use something like Lua or Scheme instead of reinventing the wheel with those new niche languages.

Re: Abstraction, not syntax

#67
post #60

As someone who's spent most of their career in cloud IAC, and likes to think they are pretty read up on the latest going on in that world, if you didn't know better you'd think YAML is one of the greatest threats facing mankind. There are plenty of things I certainly hate about it, but every configuration syntax I've ever used I have similar gripes about. It's like once a month this kind of "The world is growing tire…

> And guess what? They hate the HCL too. Don't want to sound too harsh, but to me HCL is even worse than plain YAML. By expressiveness, HCL is somewhat similar to Ansible-flavoured YAML - in both you need to use magic keywords to create any kind of abstraction (e.g. a loop). HCL is worse than regular YAML because there's only one "true" parser for it, that is official Hashicorp's HCL parser. So if you are locked into…

Not exactly true in terms of being the only parser - OpenTofu is a good project I’m highly supportive of
Post reply on HN