Safe-DS / DSL

Statically checked Data Science programs.
https://dsl.safeds.com
MIT License
14 stars 0 forks source link

Specify optional parameters by name only #1163

Closed lars-reimann closed 4 months ago

lars-reimann commented 4 months ago

Is your feature request related to a problem?

We can currently not enforce that some arguments must be passed by name only. This means, we can never change their order.

Desired solution

The Python solution with * is quite confusing. We could instead enforce that all optional parameters must be passed by name.

Possible alternatives (optional)

No response

Screenshots (optional)

No response

Additional Context (optional)

No response

lars-reimann commented 4 months ago

Won't fix this, we'll let the user decide whether to pass arguments by name or position. Since the code generator passes all optional arguments by name in the generated Python code, we can still freely swap optional name-only parameters around there.