taskThe Nosica programming language - Tasks: task #980, Implements proxies keywords

Show feedback again

You are not allowed to post comments on this tracker with your current authentification level.

task #980: Implements proxies keywords

Submitted by:  David Jobet <djobet>
Submitted on:  Mon Oct 25 20:53:29 2004  
Should Start On: Mon Oct 25 00:00:00 2004Should be Finished on: Mon Oct 25 00:00:00 2004
Category: CompilerPriority: 1 - Later
Status: NonePrivacy: Public
Percent Complete: 0%Assigned to: None
Open/Closed: OpenEffort: 0.00

Mon Oct 25 20:53:29 2004, original submission:

Proposed syntax to allow automatic delegation in the field section of a class :
TypeName field proxies (TypeName)+;

Rational : a delegate has nothing to do with class/interface inheritance.
==> It has nothing to do in the class definition line (class A implements I1
delegates ...)
Rational : a delegate is really an association
==> it has to appear as a field declaration.
rational : a delegate must have a name so that it can be used to overload a
method or do other stuff
==> a delegate is really a field and has a TypeName and a field name

Example :
public interface I1 {
sub f();

public interface I2 {
sub g();

public Impl implements I1, I2 {
public sub f() { /* implementation follows */ }
public sub g() { /* implementation follows */ }

public interface I3 {
sub h();

public A implements I1, I2, I3 {
private Impl impl proxies I1, I2; // the delegation

/* equivalent to
sub f() { impl.f(); }
sub g() { impl.g(); }
public sub h() { /* implementation follows */ }

The delegation field 'impl' forward the implementation for all methods defined
in I1 and I2.

It is always possible to overload a method implemented by 'impl'.

Example :
public A implements I1, I2, I3 {
private Impl impl proxies I1, I2; // the delegation

/* method f() is automatically implemented by impl */
public sub g() { /* do stuff / / can call impl.g() */ }
public sub h() { /* impl follows */ }

David Jobet <djobet>
Project Administrator


No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by djobet (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Error: not logged in



    No Changes Have Been Made to This Item
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup