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

The "debug everywhere" thing typically refers to GUIs and filesystem conventions. If you don't slavishly use File.separatorChar everywhere and let a "/" slip in there, yeah, you'll have bugs on windows.

For most code, and if you're not going to run on windows, it's not an issue. It's nothing like dealing with header files.



Maybe it's been long enough since I've written anything in Java for Windows that I've simply forgotten, or maybe I somehow never manipulated paths directly, but I don't recall having to worry about path separators on Windows. I believe I was using \ and / interchangeably, particularly by appending some cross-platform path with /s to the home directory path, which would have \s on Windows (e.g. %AppData%/.company/program/). Could it be something they fixed over time?


Yeah maybe they do an auto replace on windows, I actually haven't been bitten by the bug because I've never written a program intended to run on windows, ever :) Just happened to notice that File.separatorChar is there and that's what it's for. When it first came out, apple was using ":", anyone remember that?




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

Search: