Suneido

Integrated Application Platform

  • Home
  • Learning
    • Suneido Manual
    • Beginners
      • Inside Suneido
      • The Suneido Programming Language
      • The Suneido Database
      • Installing Suneido
      • Building Suneido
      • IDE Go To Tour
      • Upgrading To A New Release
    • Advanced
      • Canvas Control
      • DrawControl Part 1
      • DrawControl Part 2
      • DrawControl Part 3
      • SAX Like XML Processing
      • A Plug-In Architecture
      • A Simple Wizard Framework
      • An HTML Include Facility
      • An RSS 2 Feed Creator
      • MIME Generation
      • A New Add-on Facility
      • Workspace Improvement Hack
    • Mockito for Suneido
    • The Suneido Task Scheduler
    • Contributing To Suneido
    • Contributor Assignment of Copyright
    • Language Translation
    • Future Directions
    • Interview With Andrew Mckinlay
  • Forum
    • Announcements
    • Internals & Enhancements
    • Cookbook
    • General
  • FAQ
  • Screenshots
  • Downloads
  • Links

Re: Re: Poor man’s OOP : Mixins

Integrated Application Platform › Forums › General › Poor man’s OOP : Mixins › Re: Re: Poor man’s OOP : Mixins

January 29, 2012 at 4:48 pm #921
amckinlay
Keymaster

It is doable. Suneido assumes that classes and inheritance are “static”. i.e. you can’t add or remove methods or change super/base class “on the fly”.

Method lookup always starts in the super/base class – it does not look at the instance.

To fit in with this, mixin’s (or multiple inheritance) would also need to be static.

The current syntax is either: class : A { … }
or simply: A { … }

I could see extending this to: class : A,B,C { … }
or: A,B,C { … }

I don’t think this would cause any problems with parsing.

The main thing that would have to change is the method lookup. We’d have to decide exactly how it would work. Depth first would probably be easiest i.e. check A and all it’s super classes before checking B and it’s super classes.

If you had much multiple inheritance, it could make method lookup slow and you might need to cache method lookups.

PS. I always have to log in and out about three times to get around the redirect loop issue on this forum 🙁 Why don’t they fix that?

Search Forums

Log In
Welcome to the new Suneido Web Site and Forum.
Register
Lost Password
users of the previous PHPBB Forum should be able to log in with their previous username and password.

Recent Topics

  • Alpha copy of gSuneido to play with
  • how to start jsuneido ?
  • Problem Starting Suneido…
  • Dialog not showing buttons
  • New link for Suneidojo

Contact Us | Legal Statement | Privacy Statement | SiteMap

Copyright © 2023 Axon® Development Corporation. All Rights Reserved. - Open Source Integrated Database and Programming Language