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

[DEV] Create preprocessor #22

Open
ArgosOfIthica opened this issue Sep 28, 2021 · 1 comment
Open

[DEV] Create preprocessor #22

ArgosOfIthica opened this issue Sep 28, 2021 · 1 comment
Assignees
Labels
active development Currently being worked on
Milestone

Comments

@ArgosOfIthica
Copy link
Owner

Is your feature request related to a problem? Please describe.
Scripts frequently need to address many things in the same way; the 9 classes in TF2 for example. In normal paradigms, these are addressed with functions and lists, but these features are not compatible with the sparse computational power available to us. It is computationally optimal to simply deal with the 9 classes with 9 different services. Asking users to manually write this out is a huge inconvenience though.

Describe the solution you'd like
A painfully simple macro system. A preprocessor directive for ingesting a list of strings, and preprocessor directive for duplicating a string template where the template is instantiated with a list. We're aiming for 80/20 here; if you can't accomplish what you need with an unconditional template, use a scripting language.

Describe alternatives you've considered
Python3 cannot be sandboxed well enough to be considered for this purpose. Embedding other scripting languages would add a massive amount of complexity for nominal benefit.

@ArgosOfIthica
Copy link
Owner Author

Better late than never.

https://github.com/ArgosOfIthica/scalu/tree/feature/macros

Initial design is you can declare eagerly evaluated variables which you can use to put into other variables, or lazily evaluated templates defined with a simple inline syntax. There are compiler provided templates and variables that expose special functions and environment information; this would allow for fairly seamless additions or modules in the future. Exact syntax and features will be concretely defined as we progress.

@ArgosOfIthica ArgosOfIthica self-assigned this Apr 1, 2023
@ArgosOfIthica ArgosOfIthica added this to the V1.2 milestone Apr 16, 2023
@ArgosOfIthica ArgosOfIthica added enhancement New feature or request active development Currently being worked on and removed enhancement New feature or request labels Apr 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
active development Currently being worked on
Projects
None yet
Development

No branches or pull requests

1 participant