8000 changing syntax of member functions · Issue #154 · zetzit/zz · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Jun 17, 2022. It is now read-only.
This repository was archived by the owner on Jun 17, 2022. It is now read-only.

changing syntax of member functions #154

Open

Description

@aep

i'm going to change the syntax of member functions.

they're currently associated by being in the same module, but i think the way golang does it is simpler.

current style:

struct Foo {}

fn foo(Foo *self, int bla) {}

new style:

struct Foo {}

fn(Foo *self) foo (int bla) {}

this might also fix #123

Activity

  1. aep commented on Feb 13, 2021

    @aep
    CollaboratorAuthor

    @jwerle objections?

  2. jwerle commented on Feb 13, 2021

    @jwerle
    Member

    No objections from me!

  3. aep commented on Feb 13, 2021

    @aep
    CollaboratorAuthor

    ah well, not as easy as i thought.

    this requires solving the problem that right now absolute names have to be exactly 3 parts long, project::module::type.
    since you'd nest the functions inside the type, it's project::module::type::type, but abs can't do that.

    changing the syntax - without actually allowing multiple functions named the same way in a module - really doesn't add much.

    too much work for now.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0