DEV Community

Discussion on: Declarativity Comes at a Price

 
kephas profile image
Nowhere Man

But transforming to any different form might cost a lot. So again, it says nothing about declarativity and only about code transformation.

Transforming code to CPS might cost a lot. Transforming code to SSA might cost a lot. Transforming code to OOP might cost a lot. etc…

But writing declaratively from the start? Well, then the odds that it would cost anything substantial are significantly lower!

I wouldn't start by writing a whole library, I would just write the declarative functions I need. That's actually how functional programmers work… And it's not hard when you are used to it.

Like structured programming, OOP, concatenative programming, logic programming. Like any style, actually.