[Haskell-cafe] [OT] thoughts about OO vs. functional "philosophy"

Damien Mattei damien.mattei at gmail.com
Mon Mar 11 12:42:53 UTC 2019


when i was talking about functional programming, i was thinking to Scheme
not Haskell, when you use scheme there is no strong typing, no typing at
all in almost cases... when you use map it's map, no need to ask yourself
if it is mapM or Prelude.map or anything else.... there is no gothic
cathedral only old strong roman church style ;-)

On Mon, Mar 11, 2019 at 11:55 AM PY <aquagnu at gmail.com> wrote:

> 11.03.2019 09:51, Damien Mattei wrote:
>  > a method of a class you always have to instantiate an object...
>
> not always, static methods do not need this.
>
>  > so after another people reading your code will say,  "hey what's all
> this mess?" , and you're code will be hard to read , and even for you
> when making big program you will have tons of classes, inheritance and
> will move in a maze of classes!!! a nightmare.... sometimes, i
> experienced it! at the opposite functional programming is so easy, so
> clear for your mind.
>
> Absolutely no matter what you slice the code: functions in modules or
> methods in classes. In Haskell we also have a lot of functions, modules,
> types, etc. But the cause of the complexity is not linked directly to
> the number of entities (and in most cases it's not): programming in
> Smalltalk/Java/VB/Python/etc is simple and fast and increasing of the
> number of used classes and methods does not need more specific knowledge
> of the language and can be done by newbie who already knows the syntax,
> as you said it before - it's enough to instantiate the object and to
> call some its method! By the way, Smalltalk, as I know, even has not DI
> - I suppose due to image :)
>
> And this is false for Haskell: it's not enough to know language syntax
> (it's relatively simple): each library can involve own level of
> abstraction, own eDSLs, etc. And if somebody built his library on
> arrows, pipes, free monads, etc - it's not enough to know language's
> syntax only. Imagine a big house built with simple and same bricks. And
> some Baroque theater where anything is complex and unique.
>
> So, languages like Haskell are more complex and need more time to learn
> and create valuable applications.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20190311/7231002a/attachment.html>


More information about the Haskell-Cafe mailing list