3 ms·
> good fit for any projects where you want to combine these two programming styles. I'm always a bit wary of this. Its difficult to write a big code base in t
by rb808 9y ago
> good fit for any projects where you want to combine these two programming styles.
I'm always a bit wary of this. Its difficult to write a big code base in two different styles, I prefer a language that is mainly in one style. am I wrong?
- nine_k 9y agoSometimes you don't write a project all by yourself, and have critical parts of it already written by completely different people years ago. In a situation like that, the ability to combine two styles with a relatively low impedance mismatch is very valuable.
- Sophistifunk 9y agoI find objects are excellent for... well, objects. Things with private state and behaviour. Services, GUI components, and the like. Functions and records are excellent for business data and the transformations of business data. ¿Por que no los dos?
- stickfigure 9y agoWrite an immutable object with methods that return a new (changed) immutable object. Boom, you're an Object-Oriented Functional Programmer.
- jackmott 9y agoI sure don't want immutable linked lists everywhere
- naasking 9y ago> Its difficult to write a big code base in two different styles, I prefer a language that is mainly in one style. Not all problems are amenable to a single paradigm. Functional idioms are well suited to composing small systems, object-like abstraction is well suited to composing large systems and services. Note, object-like, not necessarily object-oriented in the Java sense.