Skip to content

Conversation

@AndreasArvidsson
Copy link
Member

@AndreasArvidsson AndreasArvidsson commented Dec 21, 2025

I'm not a big fan of how complicated the function definitions in javascript are becoming. Or how much code duplication there is.
The motivation being that if we really want argument list domain to be the same as the function domain for all of these 25+ different patterns we really need to combined them instead of trying to recreate them in a separate argument list only definition.

@pokey Any input?

@AndreasArvidsson AndreasArvidsson requested a review from a team as a code owner December 21, 2025 11:53
@AndreasArvidsson AndreasArvidsson merged commit d21522b into main Dec 23, 2025
15 checks passed
@AndreasArvidsson AndreasArvidsson deleted the jsArgumentList branch December 23, 2025 02:35
@pokey
Copy link
Member

pokey commented Dec 23, 2025

I'm not a big fan of how complicated the function definitions in javascript are becoming. Or how much code duplication there is. The motivation being that if we really want argument list domain to be the same as the function domain for all of these 25+ different patterns we really need to combined them instead of trying to recreate them in a separate argument list only definition.

@pokey Any input?

For some situations, you can just define @namedFunction and @argumentList in the same pattern (as you've done in a couple places). If that doesn't get us far enough we've def talked about building our own DSL on top of query syntax but that's obv bigger investment

@AndreasArvidsson
Copy link
Member Author

Would be nice to have our own DSL, but I can't really say that I feel like writing that at the moment. If all languages look like this I would definitely do it immediately, but most of them are quite well behaved compared to javascript.

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

Successfully merging this pull request may close these issues.

3 participants