News for hackers. Stuff that matters.
Re:Why is the function SHStripMneumonic misspelled? by hota_mazi on Sunday June 25, 2017 @06:08PM (#14632479)
> so there would have to be some coordination among the teams so everybody fixed their spelling at the same time.

What a strange approach. Why not create a function with the correct name, put the code in it and redirect the misspelled function to it?

Mark the bad function deprecated, warn the teams and after a few release cycles, remove it.

Re:Why is the function SHStripMneumonic misspelled? by oneplane on Sunday June 25, 2017 @06:38PM (#14632621)
That is exactly what I thought. I get that when it's public that is harder, but still not impossible. Software is practically never "set and forget", when those times when it is, you won't be affected either since you often don't upgrade the runtime or OS either (which is it's own can of worms).

Scrolling through logs on Linux and macOS shows a few 'deprecated' warnings here and there, and looking those up show that on average they have a few major release lifespans, and sometimes never even get removed because there is no cost to keeping it and no benefit to removing it. Often, programs have a fix in whatever update comes next and the owner often fixes those deprecation issues as a side-effect.

It's strange that Microsoft is so very good at constantly shooting themselves in the foot with this type of never ending backwards compatibility. (that often turns out to be not-so-compatible after all)

Re:Why is the function SHStripMneumonic misspelled? by derefr on Sunday June 25, 2017 @06:52PM (#14632679)
The trouble with Windows comes down to new installations of old software on new operating systems. You can't deprecate anything, because some 20-year-old binary might schlep its way onto a customer's Windows 10 box, and they'll expect it to work.

(The real key to fixing this would be layers of frozen-in-time compatibility sandboxes, allowing code written in 1995 to get a 1995-era synthetic environment, while the frameworks of today can forget about 1995. But that means dropping the ability to fix security flaws in any of that old code; or extend it with accessibility-device support that didn't exist back then; etc. The choice is obvious, and yet extremely unpalatable as well.)

Re:Why is the function SHStripMneumonic misspelled? by sbmassey on Sunday June 25, 2017 @07:09PM (#14632750)
You can still mark it deprecated, even if you don't actually get around to removing it - code that gets recompiled will see the warning and hopefully fix it, and that which doesn't will still work.
Re:Why is the function SHStripMneumonic misspelled? by derefr on Monday June 26, 2017 @01:39PM (#14638722)
Deprecation can serve three purposes:

1. to get people away from a bad practice;

2. to enable rearchitecture or refactoring that can't take place with a function of the old style "in the way"; and

3. to reduce maintenance burden.

Indefinite deprecation without removal helps with #1, but doesn't aid either #2 and #3—and without those additional benefits, usually there's no point: if you're going to be maintaining the function in perpetuity anyway, and won't be able to change the framework out from under the function, then people may as well keep using the function.

Keep in mind, also, that "deprecation" can't do much to control Windows developers; they make full and willing use of even private APIs, raw writes to private registry keys, etc. whenever they find them. Microsoft tries to keep compatibility even with these programs. With such developers around, deprecating a feature doesn't change much; as long as it's there, and calling it works, people will continue shipping code that calls it despite the warnings. They'll even write new code that calls it.

And a third argument: sometimes Microsoft deprecates a particular API for accessing some functionality, and doesn't go on to provide any alternative API for that functionality. And this isn't a case where they're saying "you just shouldn't be trying to do that any more"; these are cases where there is MSDN documentation that tells you how to idiomatically do something... by using a deprecated function. This taints the "reliability" of deprecation as a useful signal for Windows developers.

Those three effects together mean that Microsoft mostly just doesn't bother. Instead of trying to evolve APIs at all by deprecating old features and then refactoring the API surface once the old functions are "out of the way", Microsoft simply write entirely new APIs, leaving the old APIs in place. The old DLL is still there, and still maintained. It might sometimes have been hollowed out into a shim wrapper that calls into the new API... but it's very unlikely, because that destroys "bug for bug" compatibility.

Re:Why is the function SHStripMneumonic misspelled? by zachrose on Sunday June 25, 2017 @06:57PM (#14632696)
Still though, having a correctly spelled version and and incorrectly spelled version sounds better than just the latter.
Re:Why is the function SHStripMneumonic misspelled? by reacweb on Monday June 26, 2017 @06:03AM (#14635495)
Microsoft has very well handled backward compatibility in Windows 95, but very badly with Windows Vista. IMHO, this was a very hard to fix mistake that Microsoft is still paying.
Re:Why is the function SHStripMneumonic misspelled? by wildmusings on Sunday June 25, 2017 @07:08PM (#14632745)
One of the central reasons for Windows's success is backwards compatibility. 16-bit Windows 3.1 applications still work in Windows 10. There are countless teams at Microsoft whose sole purpose is to verify backwards compatibility with almost every piece of software that more than a handful of people are running.

Public API contracts are NEVER intentionally broken.

Re:Why is the function SHStripMneumonic misspelled? by TylerE on Sunday June 25, 2017 @07:15PM (#14632780)
> 16-bit Windows 3.1 applications still work in Windows 10

No they don't, unless you're somehow running Windows 10 on a 32 bit machine.

Been bitten a few times by programs bundled using ancient 16-bit InstallShield. It _does not_ work on Windows 10.

Re:Why is the function SHStripMneumonic misspelled? by TazeTSchnitzel on Sunday June 25, 2017 @07:18PM (#14632790)
“Somehow”?

32-bit Windows still exists.

Re:Why is the function SHStripMneumonic misspelled? by mappu on Sunday June 25, 2017 @07:55PM (#14632930)
Not only does it still exist, devices running 32-bit Windows 10 are still actively sold. I purchased one in 2016 (Intel compute stick) and another in 2017 (Ollee D1016W).

Both have 64-bit capable Atom CPUs, but were deliberately shipped with a 32-bit userland (presumably to save on disk space).

Re:Why is the function SHStripMneumonic misspelled? by TazeTSchnitzel on Sunday June 25, 2017 @08:08PM (#14632978)
Yep. I bought a brand new Windows tablet, what, a year ago? It runs 32-bit Windows.
Re:Why is the function SHStripMneumonic misspelled? by voltagex_ on Sunday June 25, 2017 @08:27PM (#14633061)
The interesting thing about those (Z series Atom, right?) is they're 64 bit capable, but have a 32 bit UEFI environment.
Re:Why is the function SHStripMneumonic misspelled? by TylerE on Sunday June 25, 2017 @07:51PM (#14632918)
Intel hasn't sold a 32bit chip in over 10 years.
Re:Why is the function SHStripMneumonic misspelled? by userbinator on Sunday June 25, 2017 @08:18PM (#14633017)
These are still in production: https://en.wikipedia.org/wiki/Intel_Quark

They're essentially a 486 core with some Pentium instructions added.

Re:Why is the function SHStripMneumonic misspelled? by catdog on Sunday June 25, 2017 @09:57PM (#14633483)
While technically correct sth. like the Quark is probably not what he meant but some earlier models of the Atom lineup (<= 10y, 2008 onwards) are 32bit chips. There are chips released as late as 2011 [1] which lack 64 bit support.

[1] http://ark.intel.com/products/55663/Intel-Atom-Processor-Z67...

Re:Why is the function SHStripMneumonic misspelled? by TazeTSchnitzel on Sunday June 25, 2017 @08:10PM (#14632985)
Yes, but machines with 64-bit CPUs are still being sold with 32-bit OSes for various reasons.
Re:Why is the function SHStripMneumonic misspelled? by saurik on Monday June 26, 2017 @06:13AM (#14635546)
One reason being "to run my old 32-bit software".
Re:Why is the function SHStripMneumonic misspelled? by wildmusings on Monday June 26, 2017 @12:22PM (#14637955)
You are mistaken. 32 bit software runs flawlessly on 64 bit Windows.
Re:Why is the function SHStripMneumonic misspelled? by saurik on Monday June 26, 2017 @02:17PM (#14639011)
Oh, sorry: I meant 16-bit software (which does not run flawlessly on 64-bit Windows but does run on 32-bit Window).
Re:Why is the function SHStripMneumonic misspelled? by TazeTSchnitzel on Tuesday June 27, 2017 @02:20PM (#14647846)
I assume you mean that it does not run at all. 64-bit Windows lacks NTVDM.
Re:Why is the function SHStripMneumonic misspelled? by smt88 on Sunday June 25, 2017 @07:30PM (#14632831)
That's a hardware issue, not a "Windows breaking the public API contract" issue. It's not really relevant to what GP was saying.
Re:Why is the function SHStripMneumonic misspelled? by blibble on Sunday June 25, 2017 @08:01PM (#14632952)
that's not true, virtual 8086 mode is gone but you can still execute 16-bit programs fine

Windows 10 running in 32-bit on 64-bit processors manages this without issue, so it can't be the hardware

the real reason is they couldn't be bothered to work around some of the technical issues: https://msdn.microsoft.com/en-us/library/aa384249.aspx

Re:Why is the function SHStripMneumonic misspelled? by xg15 on Sunday June 25, 2017 @07:16PM (#14632783)
I think the idea was to put the correctly-spelled version there in addition to the original one, the latter staying part of the public API.
Re:Why is the function SHStripMneumonic misspelled? by Cthulhu_ on Monday June 26, 2017 @05:15AM (#14635268)
^ this, and later on removing it from the header files so nobody can accidentally use it (e.g. reading old documentation), but existing software can still call it.
Re:Why is the function SHStripMneumonic misspelled? by hota_mazi on Sunday June 25, 2017 @07:45PM (#14632897)
The article makes it clear that the problem with renaming was not that it would break backward compatibility (because it was still a private API when this was considered) but that it would be painful to coordinate all the teams to make the change simultaneously.
Re:Why is the function SHStripMneumonic misspelled? by xxs on Sunday June 25, 2017 @07:32PM (#14632839)
No one talks of breaking existing functions/API calls. Deprecation is not the same as removal.
Re:Why is the function SHStripMneumonic misspelled? by xxs on Sunday June 25, 2017 @07:31PM (#14632835)
That's pretty much a standard procedure: Deprecate "in favor of", i.e. the correctly spelled one. You get compiler a warning telling you to rename it.

The explanation made no sense to me.