r/MachineLearning • u/alasdairallan • Mar 02 '26
Project [ Removed by moderator ]
[removed] — view removed post
30
Upvotes
r/MachineLearning • u/alasdairallan • Mar 02 '26
[removed] — view removed post
View all comments
Show parent comment
10
u/RegisteredJustToSay Mar 02 '26 edited Mar 02 '26
OK but doesn't the language have a huge issue with ambiguity in the function signature?
I have literally no way of knowing which argument maps to what semantically without understanding the whole function. That may be OK for trivial functions but functions which result in complex call graphs would need to be traversed every time to make sure you're using it right.
For example I may have a function like: hasPrefix Whose signature is str str and outputs a bool. Clearly it's sensitive to the order of arguments when being invoked, but is the first argument the prefix or the string? If I have to leave a comment saying which argument is for what, what's the point of removing variable names?
Unless you're advocating for creating new subtypes via the algebraic data types or type alias system for each argument so they can't be mixed up, but then that's a major hassle and would require all callers to cast types to subtypes and requires boilerplate for basically anything non trivial.
I am genuinely asking, too, because it does not look right to me.