Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow qualified metadata names #3959

Closed
Simn opened this issue Mar 3, 2015 · 11 comments
Closed

Allow qualified metadata names #3959

Simn opened this issue Mar 3, 2015 · 11 comments
Assignees
Milestone

Comments

@Simn
Copy link
Member

Simn commented Mar 3, 2015

Following a discussion we had on #haxe: It would be nice if we could use @:js.someName in metadata to group them. Internally this could just become a metadata named :js.someName.

Our metadata is growing into a bit of a mess so I would like to address this sooner rather than later. Any objections?

@Simn Simn self-assigned this Mar 3, 2015
@Simn Simn added this to the 3.2 milestone Mar 3, 2015
@ousado
Copy link
Contributor

ousado commented Mar 3, 2015

+1 , we need something that scales with the growing number of targets and target-specific metadata.

@frabbit
Copy link
Member

frabbit commented Mar 3, 2015

+1 and maybe we should move compiler internal metadata into it's own namespace before 3.2

@andyli
Copy link
Member

andyli commented Mar 3, 2015

What is the different between the proposal and using prefix (e.g. "@:jsSomeName")?

@Simn
Copy link
Member Author

Simn commented Mar 3, 2015

  • We can later extract all metadata for specific namespaces which is useful for documentation.
  • We can later ignore target-specific metadata when compiling to a different target.
  • We currently haven't standardized any prefix usage anyway.
  • It looks nicer.

@Simn
Copy link
Member Author

Simn commented Mar 5, 2015

  • We can later provide completion on @:js..

@ncannasse
Copy link
Member

I'm not sure about it : we have a lot of metas which are for instance cs+java, and I'm not sure how we should handle the transition from global metadata to namespaced one.

Or would that just be a filter ? for instance @:js.meta would be the same as @:meta but would check that the metadata is available in JS ?

@Simn
Copy link
Member Author

Simn commented Mar 5, 2015

I'm not sure about the transition either but I really feel like we should enforce some naming schemes. It's getting a bit out of control.

@waneck
Copy link
Member

waneck commented Mar 5, 2015

I strongly agree that our metadata naming is getting out of control. It's not only untyped and unchecked (so e.g. a misspell makes the behaviour silently fail), but it lacks namespacing. Many macro libraries for example use the @:skip metadata - each one for its own library.
I really would like to see a good solution for this.

Typed metas can always be an option :))

@nadako
Copy link
Member

nadako commented Mar 5, 2015

+1 for typed metas!

@waneck
Copy link
Member

waneck commented Mar 5, 2015

I think it would make sense. We all agree that strongly typed code is better than untyped - so I see no reason why a metadata should be untyped. We could maybe still allow the untyped metas as well - implementation still needs to be defined.

@Simn Simn modified the milestones: 3.3, 3.2 Mar 5, 2015
@Simn
Copy link
Member Author

Simn commented Mar 5, 2015

Alright, let's 3.3 the discussion...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants