2 ms·
``` type CardNumber = private CardNumber of string with member this.Value = match this with CardNumber s -> s static member create str = ``` Haha,
by mapcars 7y ago
```
type CardNumber = private CardNumber of string
with
member this.Value = match this with CardNumber s -> s
static member create str =
```
Haha, no thank you
>OOP languages for modern applications gives you a lot of troubles, because they were designed for a different purposes
For which purposes if not software development exactly?
- atsapura 7y ago> For which purposes if not software development exactly? Well, if you recognize only 1 category "software development", I can't help you. C was designed for software development as well, but you wouldn't chose it to do web development, I hope? It's a good tool when you need to develop something small and resource efficient. OOP fits good when you don't have much of concurrency, but you manage complex states in memory (which you do with help of objects and inheritance). And functional programming fits well when you need to manage data flow applications. And truth is in a big complex system you need a decent support of both FP and OOP. Point is that languages like C# decently support only OOP.