What do you find more difficult?
The achieving tasks in it or the getting paid to do so part?
The achieving tasks in it or the getting paid to do so part?
Fortunately there’s Agent/OTP, but again, pretty different than other (or popular with beginners - js/python/java) languages.
But comparing:
i = 0
for x in [1, 2, 3, 4]:
i += x
vs i = Enum.reduce([1, 2, 3, 4], fn x, i -> i + x end)
There is nothing inherently "harder" about the functional version, it's just different (and of course comes with its own benefits).When you have an imperative loop the state of any of the variables youve declared is up in the air. It gets even worse if you've shadowed variable names.
Enum.sum([1, 2, 3, 4])
Exist ;) sum([1, 2, 3, 4])
so obviously not my point :P;)