Skip to content

Mention Vyper's module system on the languages page #18613

Description

@lufa23

Affected page URL or path

/developers/docs/smart-contracts/languages/

Type of suggestion

Update existing content

Current content or behaviour

Under ## Vyper, the "Vyper does not support:" list includes a bare bullet "Inheritance". Listed alone among missing features, it reads as if Vyper has no mechanism for code reuse at all.

Proposed change

Keep the list unchanged (Vyper genuinely has no class inheritance), and add one sentence after the list:

"Since v0.4.0, Vyper supports a module system. Code reuse is achieved through composition, rather than class inheritance."

Motivation and context

The "Inheritance" entry is true but incomplete. Vyper 0.4.0 added a module system (import / initializes / uses / exports) that is the way Vyper allows for code reuse. Currently, readers comparing languages on this page may incorrectly conclude that Vyper doesn't allow for code reuse (which is no longer accurate). The addition corrects that impression.

References or related resources

Vyper docs: Modules
Vyper 0.4.0 release notes

Metadata

Metadata

Assignees

No one assigned

    Labels

    content 🖋️This involves copy additions or editsgood first issueGood item to try if you're new to contributing

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions