Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is one example of why working in a higher-level language, if you can for a given task, makes life easier.

C#:

PrintOrderDetails(orderNum: 31, productName: "Red Mug", sellerName: "Gift Shop");



Your junior colleague would still do PrintOrderDetails(1234, "SomeSeller", "SomeProduct");

And the compiler wouldn't notice.

You could uused a Roslyn analyzer that gives a warning "methods with consecutive args of the same type should use named params" I guess. Or a warning could be made at the declaring site "Don't declare methods with consecutive args of the same type".




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: