4 ms·
> There may be times where you need to make an API do nothing. It’s important to have it do nothing in the correct way. > For example, Windows has an extensive
by lucianbr 3y ago
> There may be times where you need to make an API do nothing. It’s important to have it do nothing in the correct way.
> For example, Windows has an extensive printing infrastructure. But that infrastructure does not exist on Xbox. What should happen if an app tries to print on an Xbox?
It says nowhere that the context is doing emulation for software that will not change. You just assume that because it supports the position you like. In fact, everything written applies to a program that I might write tomorrow for an XBox, and try to print something. There is nothing that designates this behavior only for old, unmaintained software.
- buttercraft 3y agoIf you write a program tomorrow, use the API correctly and this issue will not apply to you. This is for apps that aren't well written and don't check for the capabilities ahead of time.
- lucianbr 3y agoNothing Chen wrote motivates me to use the API correctly, that's the whole point. "Just don't do the bad thing" is naive. People will use APIs incorrectly, despite your admonition.
- buttercraft 3y ago> "Just don't do the bad thing" is naive. People will use APIs incorrectly That is the whole point! You don't have a choice for software that will not change - all you can do is try to keep it working anyway. Like they did here. That you are not "motivated" to do things correctly is not a convincing argument otherwise. If you don't want this behavior in your own apps, you don't have to invoke it. Using the API correctly sidesteps all of this but is not a choice when "doing emulation for software that will not change."
- saagarjha 3y agoI generally advocate for things crashing early, for reference. I just happen to work on emulators and compatibility shims a lot, much like what Microsoft is offering here.