DEV Community


Discussion on: Imperative vs Declarative Programming

loujaybee profile image
Lou — Cloud Engineer

The old me thought very much in the binary on/off terms of declarative / imperative. I used to think it made sense to only use one or the other. Over time I've come to realise that each flavour has it's own place. I generally think now more in terms of "how expressive my logic is". Sometimes higher-level code is better written imperatively to showcase steps, sometimes lower level things are better in declarative.