iface icon indicating copy to clipboard operation
iface copied to clipboard

Embedding Interfaces

Open ghost opened this issue 4 years ago • 1 comments

import iface

iface A:
  proc a(): string

iface B:
  proc b(): string

iface AB:
  (A, B)

iface ABC:
  AB
  proc c(): string

That's how inheritance of interfaces is done in go, maybe it can be implemented here, too.

ghost avatar Jan 08 '21 13:01 ghost

Since ifaces are basically dynamic concepts (even more so with @Araq's upcoming new-style concepts), this should be done with of:

import iface

iface A:
  proc a(): string

iface B:
  proc b(): string

iface AB of A, B:

iface ABC of AB:
  proc c(): string

gemath avatar Feb 24 '21 07:02 gemath