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

changing syntax of member functions #154

Open
aep opened this issue Feb 13, 2021 · 3 comments
Open

changing syntax of member functions #154

aep opened this issue Feb 13, 2021 · 3 comments

Comments

@aep
Copy link
Collaborator

aep commented Feb 13, 2021

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

@aep
Copy link
Collaborator Author

aep commented Feb 13, 2021

@jwerle objections?

@jwerle
Copy link
Member

jwerle commented Feb 13, 2021

No objections from me!

@aep
Copy link
Collaborator Author

aep commented Feb 13, 2021

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants