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

Use block parameter syntax for all generators requiring one element from a list. #32

Open
Ayfri opened this issue Aug 13, 2023 · 1 comment
Assignees
Labels
refactor Refactor needed

Comments

@Ayfri
Copy link
Owner

Ayfri commented Aug 13, 2023

For example, DensityFunctions are currently created with the following code:

densityFunction("my_density_function", abs(2.0))

It will be refactored as this:

densityFunction("my_density_function") {
    abs(2.0)
}

Maybe investigate if it should throw an error if multiple functions for setting the type are used.

This will allow namespaces to be use simpler as every parameter of the Generator are usable from the lambda.

@Ayfri Ayfri added the refactor Refactor needed label Aug 13, 2023
@Ayfri Ayfri self-assigned this Aug 13, 2023
@Ayfri
Copy link
Owner Author

Ayfri commented Aug 13, 2023

Or use the same syntax as what's currently used by recipes generator:

densityFunctions {
    abs("my_density_function", 2.0)
}
val myDensityFunction = densityFunctionsBuilder.abs("my_density_function", 2.0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Refactor needed
Projects
Status: 📋 To do
Development

No branches or pull requests

1 participant