On Mon, Jan 13, 2014 at 2:01 PM, Jonathan S. Shapiro <[email protected]>wrote:

> On Sun, Jan 12, 2014 at 6:02 PM, Ben Kloosterman <[email protected]>wrote:
>
>> Is it viable reverting  modules to namespaces ? Modules are needed with
>>>> type classes but can  interfaces with namespaces do that for bitc   ?
>>>>
>>>
>>> I don't know why modules are needed for type classes. As to the rest,
>>> that's the question I'm wondering about too: can interfaces replace
>>> modules?
>>>
>>
>> Are they not need to encapsulate / hide data types and especially their
>> creation .
>>
>
> Nope. One has essentially nothing to do with the other.
>


Shows how well I know Haskel .. I did remember F# which has modules and
namespaces  , and checking , modules are just namespaces that allow some
global let statements / functions which namespaces.  In the CLR they just
get compiled to static classes.

>
>
>> This whole static interface concept makes me go gaga  ( I still have to
>> respond to the other emails but i need to make a leap ) . Its a contract to
>> what...
>>
>
> You're *way* over-thinking it. It's just a namespace relationship.
> Nothing to do with modules. Nothing to do with assemblies. The contract is
> that if the interface type definition is lexically visible to you then you
> can call the static methods of that interface. That's all.
>

Ok i follow that and its still conceptually a contract of what "the code"
can do .

interfaces static or instance can have "internal /private" scope  by to
prevent global static code leaking out (whether that is assembly or
namespace  ?) .

Also if the static interface is defined I assume all static functions must
be there at compile time and relevant assemblies referenced ( or BitCs
version of assemblies ) . Though generic types may get created by the JIT
at runtime.

Should I assume  mixed static / instance interfaces are not allowed , they
inherit between the same type eg static or  instance but no mixed interface
inheritance.

So is this  what we are looking at ?

"modules" :namespaces with public / private namespace functions.

static interfaces :can have public / internal scope
instance interfaces :can have public / internal scope
"classes" with public  / internal scope
   class fields/ properties ?
   class methods always public scope ( use an interface to hide) .  And the
question is our constraint / interface story strong enough to get away with
this . As it shoves class based programming out in favor of interfaces

Ben
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to