Re: Standard library direction
- Posted by jeremy (admin) Sep 23, 2008
- 932 views
This is plainly not possible nor is it actually a real requirement. It would be a good thing that, wherever possible, cross platform versions of routines existed, but there will always be some routines that can only be platform specific - and still be officially supported.
I think that if a function has the ability to be cross platform, that it should not be added to the library unless it is cross platform. If we wait for someone to submit a function to do that on Unix then we will have an incomplete standard library. What will happen is John Doe will develop a program on Windows and then go to run it on Linux and find out that hey, function abc() only works on Windows. But why? It simply gets an environment variable, you can do that on Unix too! (bad example, but an example).
I do not have a problem with a function that is only available on one platform to be added and marked as a Windows Only function. For instance, getRegistryKey() or something to that effect. Now, in that example, it would be nice for a cross platform configuration library like the java.util.Preference class or something, but that's another story.
I do think that the integrity of the standard library should be kept up. I believe it's far worse to introduce a function on Windows that has a Linux counter part, but leave the Linux counter part out waiting for someone to develop it than to simply leave both of them out. A standard library only supporting 1 platform is going to leave a huge distaste for people when looking at Euphoria. It really would be better if the function did not exist than to exist for only one platform.
Jeremy