Reading from Wikipedia "Object-oriented programming" page I would say Julia
is pretty object-oriented.
Sure it do not has the traditional syntax, but OO is not the syntax, it's
the concept.
Julia has "objects" with "data fields", which are instances of "classes"
(Types), it has "methods" which are polymorphic, etc.
About inheritance, Julia does not has field inheritance, but in some sense
it has inheritance of properties, e.g., although not it is not
enforced/explicit, subtypes of AbstractArray are supposed to implement the
size() method/property (and it even hides the way each subtype
stores/represents its size).
Maybe Julia lacks a way to define interfaces, to enforce that methods are
implemented in concrete subtypes, but even for that I think that a runtime
"ERROR: no method size(MyArray)" is more than enough.
The more I use Julia the more the abstract hierarchy makes sense to me. A
"car" is "vehicle" and we can think of a "vehicle" as an abstract object,
but a concrete "vehicle" has to be either a "car", a "plane" or something
else. (Ok, in this case car is still an abstract concept...).
About the left to right reading, how about creating a syntax operator calls
the function placed on its right side with the value placed on its left as
the first argument?
Some thing like
mystring..split('\n') and myarray..size()
where the .. syntax is the same as
split(mystring, '\n') and size(myarray)
Something close to this can already be done, although for single argument
functions only:
"qwe\nasd" |> split
On Monday, December 30, 2013 11:04:02 PM UTC, Pedro Rafael wrote:
>
> Gentlemen, how's it going?
>
> Worth learning Python or Julia replaces python for scientific computing? I
> see many people encouraging the use of Python for scientific computing.
>