What specific problems does Declarative Programming solve best? -
i understand declarative languages have offer, have not yet connected dots why use them. example, not understand why describing problem more beneficial writing solution understood problem in imperative language (side-effects non-withstanding).
this not discussion makes application in declarative language. want understand circumstances , common, specific project requirements make programmer "we should use declarative language this".
as rule of thumb, guess declarative programming makes sense when there exists multiple strategies achieve 1 goal. declaratively programming what rather how let parser/compiler/runtime figure out strategies best--it optimizes execution you.
two exemples of declarative languages , optimizations:
- regular expression -- want bother underlying dfa, ndfa required fast execution?
- sql queries -- dbms has statistics , caches , can (hopefully) figure out optimal execution plan
the link provided @verisimilitude worth reading.
Comments
Post a Comment