[Haskell-cafe] [OT] thoughts about OO vs. functional "philosophy"
Tarik Ă–ZKANLI
tozkanli2023 at gmail.com
Mon Mar 11 13:42:13 UTC 2019
When you get a deep run-time type incompatibility with a difficult to debug
case, the Gothic Church that you talked about may change it's direction and
function and chase after you at a very inappropriate midnight. :)
On Mon, 11 Mar 2019 at 15:43, Damien Mattei <damien.mattei at gmail.com> wrote:
> 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.
>>
> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> Only members subscribed via the mailman list are allowed to post.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20190311/61f06511/attachment.html>
More information about the Haskell-Cafe
mailing list