Swift has an interesting take on composition via protocols (note, it also
has the concept of single inheritance):
https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/Protocols.html
it avoids copying anything into the child class, but rather sets up
I'm sorry, but I didn't find the ScalaJulia project as you mentioned.
On Monday, October 19, 2015 at 7:39:04 PM UTC+2, ssarkaray...@gmail.com
wrote:
>
> I am confident that a new OOP language *ScalaJulia *is possible
> integrating syntax of both functional languages Scala and Julia.
> Thanks,
Is it ice cream on steak or a new steak sauce added to streak ?
On Monday, October 19, 2015 at 10:43:58 AM UTC-7, Christof Stocker wrote:
>
> My two favorite languages combined! Then again, I wouldn't want ice cream
> on my steak :-)
>
> On 2015-10-19 19:39, ssarkaray...@gmail.com wrote:
>
> I
As for class composition, this is how Scala does it:
http://www.scala-lang.org/old/node/117
I've previously suggested introducing a `trait` label as to keep type and
dispatch information separate. Thus you could do:
trait A
x::Int64
y::Int64
end
trait B
z::Int64
end
type foo(A, B) <:
I think I am not talking about the same thing with you guys. In my
definition, the difference of single/multiple dispatch has nothing to do
with what I am talking. What I talked about is just a suitable way
for encapsulation.
For example, the example code can include a type and multiple
On Sunday, October 18, 2015 07:38:24 PM Abe Schneider wrote:
> > Julia isn’t object-oriented, and will probably never be. But that doesn’t
> > make it less powerful :)
>
> Of course it doesn't make it less powerful, but it also doesn't alway lead
> to nice code. The point of OOP isn't that it
I think I agree with 90% of what you wrote. I also don't know if anyone is
arguing about single or multiple dispatch. Also, while Java and Borland's
Object Pascal claimed a strong OO paradigm, C++ does does not (if you read
Bjarne's design guide, he felt strongly that both OOP and functional
My main argument in this thread is that I wouldn't consider Julia "true OO"
in the terms many other languages would define it,
but trying not to pass any real judgement of whether that is a good thing
or not (I agree with Stefan that it's an interesting experiment, and the
language is still a
Here's an example where there would normally be a strict hierarchy in
classic OOP: Square <: Rectangle <: Shape
But it actually makes much more sense in Julia (why have 2 fields for
Square??):
abstract Shape
> type Rectangle
> width::Int
> height::Int
> end
> type Square
>
My two favorite languages combined! Then again, I wouldn't want ice
cream on my steak :-)
On 2015-10-19 19:39, ssarkarayushnet...@gmail.com wrote:
I am confident that a new OOP language *ScalaJulia *is possible
integrating syntax of both functional languages Scala and Julia.
Thanks,
SS
On Monday, October 19, 2015 at 12:17:16 PM UTC-4, Tom Breloff wrote:
>
> Here's an example where there would normally be a strict hierarchy in
> classic OOP: Square <: Rectangle <: Shape
>
> But it actually makes much more sense in Julia (why have 2 fields for
> Square??):
>
Unfortunately
I am confident that a new OOP language *ScalaJulia *is possible integrating
syntax of both functional languages Scala and Julia.
Thanks,
SS
On Sunday, October 18, 2015 at 5:41:58 AM UTC-7, Sisyphuss wrote:
>
> When I'm learning Julia, I am always thinking what is the correct way to
> do OOP in
On Mon, Oct 19, 2015 at 11:09 PM, wrote:
> I am confident that a new OOP language *ScalaJulia *is possible
> integrating syntax of both functional languages Scala and Julia.
> Thanks,
> SS
>
This post wins the thread.
Going a bit on a tangent, I claim that object-oriented programming, at
least as embodied in C++, is not really suitable for scientific computing
and in fact has led certain codes to go astray.
To give a simple example, suppose you are told to write a 'matrix' class in
C++ that contains all the
>
>
> But I agree with Tobias and Simon - there is very little reason to try to
> make Julia more object-oriented. All the power you get from OO is still
> there, but you might need to think a little differently to harness it. If
> you have a concrete problem, along the lines of “this is how
On Sunday, October 18, 2015 at 1:15:50 PM UTC, Simon Danisch wrote:
>
> Besides the current flaws,
>
As already argued ("fully OOP", just not in the traditional way/syntax),
not a flaw, just different ("composition-over-inheritance"). Don't you
agree with "no flaw"? You seem, by what you
I’ve never seen a problem that foo.bar(x,y) can solve, but bar(foo, x, y)
can’t.
There *are* things, however, that are pretty easy to do in OO languages
that can’t be done in Julia; one such thing is adding/changing behavior
through inheritance. That’s pretty easy to work around, though -
It's a highly debatable claim that single dispatch class-based OO leads to
better or more maintainable software designs. I grew up on these kinds of
languages – Object Pascal, C++, Ruby, Java. Despite the ongoing rhetoric
that this paradigm solves all sorts of program design problems, that's just
On Sunday, October 18, 2015 at 9:44:21 PM UTC-4, vav...@uwaterloo.ca wrote:
>
> Going a bit on a tangent, I claim that object-oriented programming, at
> least as embodied in C++, is not really suitable for scientific computing
> and in fact has led certain codes to go astray.
>
C++ is
Julia is fully object oriented. The core of OO is not to write a dot
between an object and an associated function but that one has virtual
functions. Multiple dispatch provides just that.
Cheers
Tobi
Am Sonntag, 18. Oktober 2015 15:15:50 UTC+2 schrieb Simon Danisch:
>
> This design has at
I would say that the module is closest to a c++ namespace, which itself can
be thought of as a static class. Note, however, that in both cases you
can't really have separate instances.
Because of the desire to separate dispatch from type information, Julia
doesn't really follow the OOP
This design has at least 3 issues, since you can't have instances of a
module.
In general:
I personally would value the discussion of why Julia needs more OOP
constructs much more, If one can show that there are terrible flaws in
Julia's model which are swiftly solvable with OOP.
My guess is,
22 matches
Mail list logo