Re:Imperative configs are out; Declarative configs are in
by phailhaus on Wednesday November 09, 2022 @02:21PM
(#33536547)
I was thinking the same thing, but his point is that with Google Maps you simply declare your end goal. It figures out how you should get there based on current conditions.
[ Parent
| on HN ]
Re:Imperative configs are out; Declarative configs are in
by naphatkrit on Wednesday November 09, 2022 @02:29PM
(#33536648)
I guess I should have said "voice-guided" turn-by-turn huh? https://www.forbes.com/sites/anthonykosner/2012/12/13/google... is what i was referring to :)
Re:Imperative configs are out; Declarative configs are in
by moralestapia on Wednesday November 09, 2022 @02:50PM
(#33536913)
Huh? Voice or not, it's still imperative. :grimacing:
Re:Imperative configs are out; Declarative configs are in
by phailhaus on Wednesday November 09, 2022 @03:16PM
(#33537230)
"Declarative" and "imperative" are relative to the goal you are trying to achieve. If your goal is only to reach your destination within some parameters, then writing down every single step to get there is imperative. The declarative approach is to specify the destination and those parameters, and allow the engine to determine how to get there.
Re:Imperative configs are out; Declarative configs are in
by saltcured on Wednesday November 09, 2022 @05:31PM
(#33539002)
Right, imperative directions would be the turn by turn recipe to get from A to B. Declarative directions would be "be at B". Route planning is the solution method to convert from declarative to imperative navigation directions.
Of course, it's also a nuanced value judgement. The declarative/imperative abstraction is almost fractal, as we could consider a trip with multiple intermediate destinations as either a declarative itinerary or an imperative plan. Or we could go further and talk about all the control steps it takes to "turn right in 100 meters".
What the article describes for the father's driving is the difference between ahead-of-time and just-in-time navigation. It's not a very good metaphor for declarative versus imperative configuration management. To turn it into one would make for a perverse story, i.e. telling the father where you want to meet versus telling the father a long list of turns starting from the airport while obfuscating the destination.