Hacker News new | ask | show | jobs
by elihu 3309 days ago
I suppose learning a language that forces you to work in a declarative style (such as Haskell) rather than imperative might be enlightening, but if that's not practical you could try using declarative style in C and/or Python. For instance, don't use global mutable variables and whenever possible write functions that take in const arguments and produce some return value without changing the state of anything.
1 comments

I'll definitely check out Haskell, thanks for the input!
Another language I might suggest for exposing yourself to declarative / functional programming is Erlang or Elixir. I've tried to learn Haskell myself but the number of new concepts can be really daunting. Erlang is a little easier to get going with, and exposes you to many similar declarative concepts.

http://learnyousomeerlang.com/content