Hacker News new | ask | show | jobs
by bsder 2214 days ago
Except that C# worked on 64-bit OS's practically from the start and Delphi--still only marginally does.

And this isn't theoretical--Altium actually did a full code rewrite in order to get off of Delphi because of this.

3 comments

Unfortunately C# and the rest of .NET ecosystem (and for that matter Java and rest of JVM) are not fully 64bit capable to this day and will probably not be fully 64bit capable for the next decade if ever. What do I mean with this? .NET and JVM native arrays use 32bit indexes and most standard container classes also use 32bit indexes so you cannot have more than 2^31 elements. Who needs that many elements in the array? No-one who develops in these environments...because they can't have them so they move to something that can.
I think you can, but it does involve a configuration switch [0]. The index accessor for arrays has always been allowed to be of type long, the runtime was the one causing the trouble. As for List<T>, it's still problematic since all the methods still accept an int.

[0] https://docs.microsoft.com/en-us/dotnet/framework/configure-...

You can have 2GB array of 2GB arrays if you’d like. But, having a single contiguous huge block is only one scenario for 64-bit, not the only one. I doubt it’s the most common one either.
I am not sure what you mean under marginally. Delphi and FreePascal/Lazarus have no troubles producing 64bit executables. I have ongoing commercial product in Delphi and it is 64bit only.
Was it available in Delphi in 2016?
It was available since Delphi XE2 which was released in 2011.
This hurt one of my competitors, they couldn't support 64 bit machines for a long time because they were using Delphi.