DEV Community

Discussion on: I am a mediocre developer

Collapse
 
prestongarno profile image
Preston

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

Collapse
 
sobolevn profile image
Nikita Sobolev • Edited

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.

Think of it as a personal preference.

Collapse
 
prestongarno profile image
Preston

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.