12

I was reading the through the list of differences between the Silverlight implementation for Windows and the implementation for the MAC. Which can be found HERE.

While some of the differences are obviously related to the platform diffirences etc. There are some that I just wonder why they would be different at all. If anyone has some thoughts or actual concrete information on this, I would be interested to hear your input.

Here are a few of the things that seemed strange, especially the last point in my list, which is what actually prompted me to post this question.

  1. Char.ToLower(Char, CultureInfo) - On the MAC the current culture is used rather than the specified culture. Strange since the MAC presumably does support multiple cultures (I don't own a MAC or know much about it so this is an assumption on my part)
  2. Decimal/Single/UInt16/UInt32/UInt64 - The document states that the mentioned types are not supported, is it that the OS does not support them so they are 'emulated' (I use the term 'emulated' loosely since the underlying CPU definitely supports them excluding Decimal of course).
  3. Double/Single *Infinity properties - Why have these return different strings on the different platforms. Now I am not saying people should use the string representation for comparisons, that would be silly, but why make them different, isn't that just looking for portability problems where they do not need to exist? Or is this more a platform specific user experience issue, MAC users expect to see the infinity symbol rather than the words?
  4. CultureInfo Constructor - On Windows if an invalid culture string is passed to the constructor an ArgumentException is thrown, on the MAC the CultureInfo is initialized as the current culture and no exception is raised.

Now none of these are serious differences given that your code is written according to commonly understood best practices. However, I wonder why a thing I consider, possibly incorrectly, to be part of a behavior contract, though not explicit in .NET, like what I can expect when passing an invalid culture string to a constructor, does not deliver a consistent behavior across platforms, that seems rather arbitrary and again just looking for portability problems where there there is no good reason, or is there?

Chris Taylor
  • 52,623
  • 10
  • 78
  • 89
  • 4
    Seems like MAC only support one culture that is of Apple :) – Ankur Apr 30 '11 at 08:53
  • Yeah right. You do understand that Darwin is a fork of BSD which is a fork of Linux which actually means that in this case, Windows support only it's own culture. – Pier-Olivier Thibault May 18 '11 at 12:37
  • Well regarding number 1, I see the documentation says the culture is not supported with 10.4 and lower. I wonder if it has something to do with the processor architecture that OSX 10.4 and lower supported. With 10.5 they started supporting intel which brings it in line with windows. That might have made it easier to implement... or it could be something as simple as they ran out of time and cut that "feature". :) – Brian Dishaw May 20 '11 at 12:37
  • @Brian Dishaw, that is an interesting point, I wonder if anyone could confirm that 10.5 works differently or was it just that when the docs where written 10.4 was the latest version and it was not updated when 10.5 came along. – Chris Taylor May 20 '11 at 16:27
  • Actually, I consider the first CultureInfo related points pretty serious. Thanks for bringing it to my attention :) – Thorarin May 20 '11 at 16:57
  • Seems apparent to me that Microsoft, for whatever reason [insert list of dozens of marketing and budgetary reasons], does not give OSx it's full attention. This is obvious in Office and other non Windows microsoft software, sans x-box. Although I do not really know why these diferences exists, I can only assume they are not technically driven, other than through the lack of funds for the technical teams. Microsoft has a lot of money. That does not mean all their projects do. For MS, OSx is a second class citizen. Some of these issues likely needed more time that was available to figure out. – ptoinson May 23 '11 at 17:10

0 Answers0