[Haskell-cafe] Hoogle and Network.Socket
claus.reinke at talk21.com
Fri Feb 20 18:35:26 EST 2009
>> > 1) Show all the functions (when the number is low), but place platform
>> > specific functions under separate headers: "Windows",
>> > "Linux/BSD/POSIX", "OS X", etc.
>> If a function isn't available on all OS's then all Hoogle would be
>> encouraging you to do is break compatibility and stop me from using
>> your software.
How about showing all functions, but indicating available platforms?
That way, we won't go looking for functions that work on "my platform",
but for functions that work on the most platforms. And if we're looking
at a function that isn't portable, we'll know immediately - unless I'm
explicitly in one-shot/one-platform mode, portability (or lack of) is
rather important information for me. It would be ok to filter that info
in some way (character codes, or green symbol if it is available on
major platforms, red otherwise, with more detailed info at package level).
One of the most appealing things about Haskell, usually more common
with scripting languages, is that it is possible to write portable code in
it. So we don't have to make extra efforts to "code for Windows" or
"code for Unix" - we just have to make the small effort to ensure that
we are not coding for any particular platform. The less platform-specific
code, the less work when a piece of software starts being successful.
It would be very nice to have this info at the package/hackage level,
too, including transitive dependency chasing. That way, package
authors will not accidentally depend on packages that have non-portable
dependencies, but have the chance to prefere portable alternatives
whenever possible (unix vs unix-compat, etc). And package users
will see where "cross-platform" was sacrificed.
More information about the Haskell-Cafe