Re:Show HN: Togomak – declarative pipeline orchestrator base...
by latchkey on Tuesday October 24, 2023 @09:42PM
(#38008120)
Sorry, won't back down that HCL is junk. When it is easier to not do best practices in examples, then you're off on the wrong foot to begin with.
[ Parent
| on HN ]
Re:Show HN: Togomak – declarative pipeline orchestrator base...
by dpedu on Wednesday October 25, 2023 @01:23PM
(#38015400)
I could point out how it's way, way easier in java programs, since we're picking on java, to skip over doing things like this. Or I could point out how the bar to do things correctly is lower in this hcl example than the equivalent java. Or I could point out how the things I named as best practices can look in the real world, which seems to be the best course of discussion since unfamiliarity seems to be an issue here:
You have a type defined, it's just string. There's no default, which means it's a required input. Required inputs obviously can't have a default. Arbitrary strings are a perfectly acceptable input and without seeing how that variable is actually used, I can't speculate about validation criteria and it is very reasonable that for arbitrary strings there are none.