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

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c++ - Using OpenSSL in a multi-threaded application -

All overlapping substrings matching a java regex -