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 implicit unassigned langs in functions #14

Open
isaiahshiner opened this issue Jul 27, 2021 · 0 comments
Open

Allow implicit unassigned langs in functions #14

isaiahshiner opened this issue Jul 27, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@isaiahshiner
Copy link
Member

Going to add a bunch of issues for important features/bugs I just don't want to work on right now.

In a library dit, you should be able to declare functions without importing the language. Otherwise, many different libraries would import the same languages over and over. These langs will get added on the fly, identical to if you had done lang Javascript {||} and not defined anything.

Keep in mind that lang names are not global (same name across file) but universal (same name anywhere in any file). There is only one JavaScript. That's why it's okay to not protect lang names behind dit namespaces.

  1. import must merge every lang in the target
  2. pull must check if it's pulling a func and merge it's lang.
  3. There should be a boolean Assigned attribute on langs. It should be true for any lang def that is complete and requires no additional declarations. Assigned = true always overwrites null or False regardless of priority.
  4. If a function is called while its lang has Assigned = false or null, that should be a UnassignedLangError. Currently, it just errors when it gets a MissingPropError, which is confusing.
@isaiahshiner isaiahshiner added the enhancement New feature or request label Jul 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant