On 08 Jan 2014, at 11:25, Matthias BUSSONNIER <[email protected]> 
wrote:

> Some misc comment too :
> 
> > Julia is not object oriented
> 
> Is that True ? From the manual :
> 
> >  It is multi-paradigm, combining features of imperative, functional, and 
> > object-oriented programming.
> 
> I consider that Julia can be OO, the code just look different than in other 
> languages.

I did not mean that Julia does not support object oriented programming. I mean 
you can program object oriented in pretty much any programming language since 
it is mainly about a way of thinking.  But given Julia’s feature set I would 
say it isn’t pushing object oriented thinking. To me it is similar to google 
Go. As far as I remember the authors say Go isn’t object oriented although it 
certainly supports object oriented programming.

I personally think Julia distinguish itself positively by not incorporating a 
lot of the traditional ways of doing Object Oriented Programming such as 
inheritance of concrete types. The google Go authors also realised this was a 
mistake. From my experience of programming C++ for many years on large 
projects, I think Julia will avoid the following problems I have experienced:

1. The fragile base class problem
2. The confusion about whether an overriding function should call it’s super 
class version or not.
3. Accidentally calling a virtual function in the constructor. This goes bad in 
C++, C# and Java in different ways. Usually resulting in difficult to debug 
bugs.
4. Deep class hierarchies. Your average developer seem to keep adding concrete 
subclasses for convenience until the code is a mess. I don’t consider a deep 
hierarchy of abstract types in Julia a problem, because they are much easier to 
reason about that a deep hierarchy of concrete classes.

But I agree that whether one should call Julia object oriented or not is a 
difficult issue, because it might make sense for marketing purposes. Many 
people don’t seem to want to touch programming languages which are not object 
oriented, as if there is something wrong with them then. I think the teaching 
of object oriented programming is much to blame for this, because Object 
Oriented programming is often taught as a better way of doing things in general 
rather than as better way for modelling certain problems.

> 
> Liked the blog post too otherwise thanks, I would also have mentioned 
> code_lowered, code_llvm and  code_typed
> not everyone is fluent assembler and those tool are really useful to, 
> especially in metaprogramming.
> 

Hehehe I actually looked at those briefly but could not make immediate sense of 
them. Assembly code made more sense to me. For most people with my background 
from micro controllers, robotics, systems programming  and such I think you 
would be more familiar with assembly code than abstract syntax trees. I learned 
about ASTs long after I learned Assembly.  But I guess for the targeted 
audience of Julia there are not many micro controller programmers ;-)

I am playing around with julia meta programming at the moment, but I am not 
very good at it yet.

Reply via email to