Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Declarative languages can absolutely loop. Otherwise functional languages wouldn't be a thing.

HCL's looping and conditionals are a mess but they're wonderful in comparison to its facilities for defining and calling functions.



The concept of repeated operations executing with respect to some condition is always going to be a bit different in declarative / functional constructs than in imperative ones. A purely functional language is never going to have the equivalent of: for (...) a++;

Good functional languages like Clojure make something like this awkward and painful to do, because it doesn't really make sense in a functional context.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: