> Julia is OOP! > > If it is, how do you do the following in Julia: define a class (i'm using Python parlance) Foo with some attributes, say if x is an instance of Foo it has an integer x.n ; and then define a class Bar that inherits from Foo, that is, has all the attributes from Foo, and some more, for example if y is an instance of Bar it has y.n because it is an instance of Foo, and say it also has a string y.name. In python
class Foo: n= 0 class Bar(Foo): name= "" These classes don't even have methods, so it's not exactly complicated OOP. Yet, I'm not sure how to do this (emulate this?) the Julia way. Presumably, not with the <: relation at all. I'm wondering how multi-dispatch comes in, given there are no methods involved. (btw I guess i'm only trying to supply another example of a novice's misunderstanding of what he's read here and there. With zero actual Julia practice (who installs a language when reading a tutorial?) May it help you deal with users' questions in the future.) -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.