digitalmars.D.bugs - [Issue 14742] New: Changing function signatures breaks code
- via Digitalmars-d-bugs (31/31) Jun 27 2015 https://issues.dlang.org/show_bug.cgi?id=14742
https://issues.dlang.org/show_bug.cgi?id=14742 Issue ID: 14742 Summary: Changing function signatures breaks code Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: regression Priority: P1 Component: phobos Assignee: nobody puremagic.com Reporter: thecybershadow gmail.com This issue is a follow-up to my GitHub comment: https://github.com/D-Programming-Language/phobos/pull/3422#issuecomment-115654816 Reposting it here so it doesn't get lost: """ OK, so this actually broke code for me. I have a wrapper that wraps arbitrary file operation functions and makes them atomic (by writing to a temporary file and renaming it onto the target). I use ParameterTypeTuple to find which parameter contains the "target path" string, which doesn't work now that the function is a template. I also had a similar breakage when std.file.copy gained a third optional parameter. Since the usual way to create a function wrapper (using ParameterTypeTuple) does not account for optional parameters, the parameter became non-optional in the wrapped function, which broke code using it. It seems to me that to truly avoid all breaking changes, we can't touch any Phobos function signatures at all. This is probably too drastic, so I think we need to establish some conventions of what breaking changes are acceptable. """ --
Jun 27 2015