> In general object oriented programming results in a more clean code base ( 
> example ).

Have you ever seen any codebase of a sufficiently large Java 
library/application? I have yet to see _one_ example where OOP lead to a 
cleaner code base. [This image is usually a pretty accurate description of an 
OOP codebase](http://forum.nim-lang.org///imgur.com/Q0vFcHd).

> Personally i do not understand why people still insist on functional 
> programming.

Nobody suggested functional programming.

> Both do the same in this simple example.

And none is functional.

> But as one starts to extend functionality, its where you are much more likely 
> to run into conflicts ( forcing the need for instance to namespace ).

Namespaces have nothing to do with object orientation. You can perfectly use 
namespaces in non-OOP languages.

> Of the two examples, what is more easy to extend ( inherit, override, 
> abstract, etc ) and clean. Its simply the object oriented version.

So you show some OOP code, then you show some imperative, non-OOP code, and 
then you ask which is more easy to _inherit_, _override_, make _abstract_? 
Well, those are all things you do in OOP languages, and you just assume that 
this is useful and needed without providing any evidence for it. So tell me: 
How would you want to extend a _round_ function, so that OOP becomes useful? 
The only useful extension is to be able to use it on other types than just 
`float` \- and that can easily be done with generics and without OOP.

And um, calling this messy `class Main {` stuff _clean_ is… nothing I would do.

> If we simply look at GoLang with its forced function paradigm, it still 
> relies on C like function attachment to objects.

Go is not functional, it is imperative. I also do not understand what exactly 
you mean by „C like function attachment to objects“. You seem to assume that it 
is necessary to attach functions to objects, without providing any evidence for 
it.

> Nim really focuses more to Python developers. Where Crystal really focused on 
> Ruby developers.

I do not think Nim focuses on Python developers at all. It shares some 
syntactic constructs with Python, but it is very different. Crystal, on the 
other hand, seems indeed to be very focused on Ruby devs.

Reply via email to