[ghc-steering-committee] Status
Richard Eisenberg
rae at richarde.dev
Wed Mar 10 04:11:43 UTC 2021
> On Mar 9, 2021, at 3:34 PM, Iavor Diatchki <iavor.diatchki at gmail.com> wrote:
>
> Well, it sounds like you are saying that to use FFI one would have to buy into DH design. My concern is not about what pragmas the users have to write---after all we could make them write no pragams whatsoever. It is about what users would have to understand. For example, why does it matter that there is no data constructor `Bool` in scope? I am passing a type to `sizeOf`, why would GHC all of a sudden get confused between the type and the value?
Just as much as users of arithmetic have to buy into a design using type-classes. That is, we're aiming to design a cohesive language, and that means that someone trying to understand the design of the language (i.e. our FFI user) will have to consider it holistically.
As for confusion between types and values: this is the heart of the matter. I agree that, taking #281 alone, it would make more sense to say sizeOf @Bool. But in the context of a design that might support dependent types, it makes more sense to say sizeOf Bool, and have name lookup try both namespaces (the data constructor namespace first, followed by the type namespace). This is why I wrote #378, so that we could decide which design is better for #281.
Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-steering-committee/attachments/20210310/5c2b71cf/attachment.html>
More information about the ghc-steering-committee
mailing list