|
|
|
|
|
by rodrigosetti
1245 days ago
|
|
I don’t think any technique is inherently bad: imperative, global variables, and even “goto” can be used wisely to solve problems. Functional programming (similarly type systems) is another great technique to use when you have constraints that you’d like to be automatically enforced by the compiler (referential transparency, equational reasoning, etc.) When I have to use a language that doesn’t allow expressing problems functionally when that would be the ideal expression of it, I feel I’m using the wrong tool for the job. |
|
The word "wisely" does the heavy lifting here. Put it this way: would you rather work on a legacy code base that has goto statements all over the place, or on one where strict standards were applied?
I find this is the relevant question when it comes to programming styles.