addNewControl(āNewā, 50, 20, 100, 50);
What does that mean? Types donāt help, itās just &str, int, int, int, int
agree that the named arguments are a nice solution here (which is why i like the python idea, you get the ability to annotate with names routinely)ā¦
⦠but with the C++ overloading, you can āsay it with typesā. How aboutā¦
addNewControl(āNewā, Point2d(50,20), Size2d(100,50))
āaddNewControlā could have all sorts of overloads, - e.g. omit the āsizeā, and you expect it to figure it out itself. Omit position, and you expect it to place somewhere sensible in the parent window.
Its funny how divisive this is. Iāve seen people argue against keyword args claiming that leveraging types is superior. (Youāre creating more semantics the compiler understands) - but I donāt see them as mutually exclusive. Iād like both
Also, not sure why you want => instead of the simpler and clearer =.
that doesnāt fit in rustsā grammar already; = can be used within expressions. (but it returns () unlike c++⦠not sure of the use)