Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
I don't really get this "mutation is bad" thing either.
It improves readability imo 🤷♂️ -
@nitwhiz that's true, but the main reason puppet doed this is to avoid unexpected results in your provisioning since variables cannot change.
Imagine writing an 'accounts' resource and let the password get filled in by variable. Now imagine you set the password variable in your hiera or enc, and in your manifest your variable changes to something else along the way before it gets to the account resource realization....
It's a sensible quirk, just weird and geargrinding when you're not aware of this. -
@nitwhiz
While sound in most cases, it's particularly useful in highly parallel, highly concurrent scenarios. Slightly increases memory pressure, dramatically reduces memory leaks due to faster collection cycles and no pins, eliminates concurrency issues, because no two things write to the same data. Future state eliminates race conditions/eventuality related to two disconnected operations updating the same data in memory. It's a natural side effect of unidirectional messaging.
It's also not the "right answer," there is no right answer. It's just an answer.
Readability, that's a per-team subjective measurement. -
if a variable is a static constant, then it's not a variable, since it's not variable, but is a constant, since it's constant.
so the actual accurate statement would be "PuppetDSL doesn't have variables, only constants"
Related Rants
-
netikras7- just do your job. Close this ticket already and go to the next one - It's just a 1 minute job.. Don't build...
-
AlgoRythm0"Oh, I hadn't thought of that. I'll use that. Thanks!"
-
opengenus26Me (as a Senior developer): How will you solve this problem using regular expression? Junior developer: *Expl...
'Every variable is a static constant once declared'
All variables in PuppetDSL, really hard to wrap the head around if you are 'used to' re-assign a variable a new value.
rant
wk193