Great article, but I think you're being a bit hard on yourself.
Although I have to 100% disagree with this statement:
Prefer regular functions over classes
Why? Unless youre using higher-order logic to write decoupled functional code (functions that take functions, combining or composing them), then functions are IMO a bad idea
That's because I spend a lot of time using functional languages (elixir, elm, a lit bit of reason).
And it seems to me that functions are much easier to compose, extend, and reuse.
Makes sense. I've been using Kotlin which is as close to functional as you can get on the JVM without breaking from the stdlib, so it was a bit rough learning to mix and match OOP and functional. I definitely prefer functional style but can be dangerous when trying to use libs and frameworks which are often just wrappers around java classes, if at all.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Great article, but I think you're being a bit hard on yourself.
Although I have to 100% disagree with this statement:
Why? Unless youre using higher-order logic to write decoupled functional code (functions that take functions, combining or composing them), then functions are IMO a bad idea
That's because I spend a lot of time using functional languages (
elixir
,elm
, a lit bit ofreason
).And it seems to me that functions are much easier to compose, extend, and reuse.
Think of it as a personal preference.
Makes sense. I've been using Kotlin which is as close to functional as you can get on the JVM without breaking from the stdlib, so it was a bit rough learning to mix and match OOP and functional. I definitely prefer functional style but can be dangerous when trying to use libs and frameworks which are often just wrappers around java classes, if at all.