SPONSORS:






User Tag List

Results 1 to 5 of 5
  1. #1
    Senior Member
    Join Date
    Jan 2001
    Posts
    750
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Can Silk do multi-inherite declarations...

    Can you actually declare multi-parent class at implementation time, like in c++.

    i.e.: winclass a : b, c, d

    even though previous code is not allowed in silk.

    I just want to make my code clean. Instead of having this:

    winclass a
    winclass b:a
    winclass c:b
    winclass d:c
    ...
    you get the idea.

    ------------------

  2. #2
    Senior Member
    Join Date
    Aug 1999
    Location
    Cambridge, UK
    Posts
    470
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Can Silk do multi-inherite declarations...

    In short, no.
    In long, your two examples mean different things, and multiple inheritance is not a neater or more cleaner way of writing the same code; it is a way of writing different code that is structurally dissimilar. Also, I am impressed that you want to. I use the OO stuff a bit, (reliance on polymorphism is about as far as I get) but not to the extent that I would really need multiple inheritance or anything else really complicated.

    ------------------

  3. #3
    Member
    Join Date
    Dec 2000
    Location
    San Francisco, CA
    Posts
    51
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Can Silk do multi-inherite declarations...

    I really cannot see any advantage (in your example) even if you are allowed to do this.

    What's the sense of using:

    winclass a : b, c, d

    When you can use:

    winclass a : d

    Anyway, in your example you need to code it like:

    winclass b
    ... your members here...

    winclass c : b
    ... your members here...

    winclass d : c
    ... your members here...

    winclass a : d
    ... your members here...

    I don't see any problems here.

    But of course, maybe if you need it like this:

    winclass b
    winclass c
    winclass d
    winclass a : b, c, d

    then you are not allowed to.


    ------------------

  4. #4
    Senior Member
    Join Date
    Jan 2001
    Posts
    750
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Can Silk do multi-inherite declarations...

    It's true that I still don't see the use of classes on most of the times.

    There are still some common area that I see the use, most likely the resusability and clarity aspects.

    Common stuff: file input/output, verifications initialize/finalize of the script.

    You just get too messy when your code gets too long. All these function only differentiated by their parameters gets your head dizzy. Another advantage is the ADT aspect of classes which makes it better than functions, since they can be generic enough so even altering with parameter(order) won;t affect the programmer.

    I mean classes only is an advantage if your code gets real long. Otherwise is not that a big deal.

    ------------------

  5. #5
    Member
    Join Date
    Dec 2000
    Location
    San Francisco, CA
    Posts
    51
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Can Silk do multi-inherite declarations...

    Huh, now this thread is about the advantage of classes??? I thought that this is about multi-inheritance???

    How could you see the benefits of a thing when in the first place you doesn't know what you are trying to achieve???

    /* Those who fail to plan are inadvertently planning to fail. */

    ------------------

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 09:06 AM.

Copyright BetaSoft Inc.