[Haskell-cafe] OS Abstraction module??

David Roundy droundy at darcs.net
Tue Oct 23 10:47:38 EDT 2007


On Mon, Oct 22, 2007 at 09:44:11PM -0500, Galchin Vasili wrote:
> Hi Ryan,
> 
>     Thanks for your generous response. " By the way, you don't want to
> use typeclasses here; they solve the problem of having more than one
> possible interface at runtime, whereas you only care about compile-time"
> .. in reality I do care about decisions made at run-time (this just
> struck me as I am writing).  I am trying to avoid "ifdef's" and have all
> decisions made at run-time (maybe given the nature of Haskell .. i..e
> static/compile-time type checking this is impossible) ...

I don't see how in any language you could introduce working
run-time-determined os-specific code.  How would you link with the windows
libraries under linux, and vice versa? And moreover, why would you do so?
Unless you're talking about running under an interpreter, I don't see how
you'd construct a binary that would be able to run under both windows and
linux.

> ... Trust me as i said in a previous post I am not a big fan of C++. I
> guess we are talking about strong type checking .. but static vs dynamic
> .. in the case of C++ it is a mixture, e.g. when a C++ class's member
> function is not "virtual" then "call resolution" is done at compile-time
> vs "virtual" when it is done at run-time via the virtual function
> table. Everybody ... by no means am I a booster of C++ .. i.e.  "done it,
> seen it ...". Maybe a previous "poster" addressed my concerns. In
> discussing this OS Abstraction Layer, I think I am thinking of some
> notion of "laziness" (read ... decisions made at run-time .. not
> compile-time ..  otherwise I think we have to resort to ifdefs which are
> not so nice and require a lot of code maintenance.)


More information about the Haskell-Cafe mailing list