Re: [chuck-users] multiple inheritance
That the approach I m thinking about now.
But this way (including one object into one other) constraints you to have additional interface functions? Ok I know my question is not clear ;-) let's illustrate it with an example:
<snip> Yes, as far as I can see that will fly and indeed looks sensible for some use cases. If it is just a function you could also write it outside of any class, then call it from within your class with "this" as a parameter, in some cases.
If you feel I am lazy its true ;-) That's why I like to program, I make the machines work for me!
Of course you are, that's a virtue for programmers. Quite often the way to lazyness is through understanding. Well, the way to lazyness you can get away with is. Being lazy, making sweeping generalisations, theft, all great stuff ;-) Yours, Kas.
I am not sure to understand what I should try with "this" parameter. Do you
know where can I find an example?
2012/10/5 Kassen
On Fri, Oct 05, 2012 at 04:54:28PM +0200, Julien Saint-Martin wrote:
That the approach I m thinking about now.
But this way (including one object into one other) constraints you to have additional interface functions? Ok I know my question is not clear ;-) let's illustrate it with an example:
<snip>
Yes, as far as I can see that will fly and indeed looks sensible for some use cases. If it is just a function you could also write it outside of any class, then call it from within your class with "this" as a parameter, in some cases.
If you feel I am lazy its true ;-) That's why I like to program, I make the machines work for me!
Of course you are, that's a virtue for programmers. Quite often the way to lazyness is through understanding. Well, the way to lazyness you can get away with is.
Being lazy, making sweeping generalisations, theft, all great stuff ;-)
Yours, Kas. _______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
On Fri, Oct 05, 2012 at 05:15:45PM +0200, Julien Saint-Martin wrote:
I am not sure to understand what I should try with "this" parameter. Do you know where can I find an example?
Never mind. Right now I am suspecting that what I wanted to do may run into type-system issues. I would need to actually test it and for that I don't have the time right now as I have to prepare a little event. I hope to get back to this. Kas.
Ok no problem,
Have nice show!
2012/10/5 Kassen
On Fri, Oct 05, 2012 at 05:15:45PM +0200, Julien Saint-Martin wrote:
I am not sure to understand what I should try with "this" parameter. Do you know where can I find an example?
Never mind. Right now I am suspecting that what I wanted to do may run into type-system issues. I would need to actually test it and for that I don't have the time right now as I have to prepare a little event.
I hope to get back to this.
Kas. _______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
In my personal opinion "composition" is more safe/organised than multiple inheritance... just create a class C, and inside of it create two properties, one instance of B another of A. Mix their functionalities to taste under one unified API. For me sounds more fun, than inheriting :P happy chucking On 5 October 2012 17:24, Julien Saint-Martin < julien.saintmartin@googlemail.com> wrote:
Ok no problem, Have nice show!
2012/10/5 Kassen
On Fri, Oct 05, 2012 at 05:15:45PM +0200, Julien Saint-Martin wrote:
I am not sure to understand what I should try with "this" parameter. Do you know where can I find an example?
Never mind. Right now I am suspecting that what I wanted to do may run into type-system issues. I would need to actually test it and for that I don't have the time right now as I have to prepare a little event.
I hope to get back to this.
Kas. _______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
participants (3)
-
henrique matias
-
Julien Saint-Martin
-
Kassen