Skip to content

Update guidance: published interfaces can also evolve via default method implementations #164

Description

Summary

Update the guidance page microsoft/knowledge/interfaces/extend-published-interfaces-dont-edit-them.md to reflect that AL interfaces now support default implementation methods, which can provide a non-breaking way to evolve published interfaces.

Problem

The current page recommends extending a published interface via a new interface rather than adding methods directly, because adding a method changes the contract and breaks existing implementers.

That guidance misses a newer AL capability: interface methods can now have default implementations. Adding a new method with a default implementation can allow existing implementers to remain compatible.

Requested changes

  • Update the guidance to acknowledge default interface method implementations as an additional evolution strategy.
  • Clarify when to prefer:
    • creating a new interface that extends the published interface, versus
    • adding a default method implementation to the existing interface.
  • Document tradeoffs and caveats for each approach (readability, versioning clarity, compatibility expectations, and long-term maintenance).
  • Update or add samples to show the default-method pattern alongside the existing extend-interface pattern.

Acceptance criteria

  • The page explicitly mentions default implementation methods as a non-breaking option.
  • Best-practice section explains decision criteria between extends and default methods.
  • Samples are updated/added to demonstrate the new guidance.
  • Existing guidance intent (avoiding breaking changes for implementers) remains clear.

Reference

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions