Re: Overloading and overlap

Daan Leijen <[email protected]> Wed, 20 Apr 2005 12:34:15 +0200
Newsgroups gmane.comp.lang.haskell.ffi
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--===============1578208203==
Content-Type: multipart/alternative;
	boundary="------------080707010306080801090308"

This is a multi-part message in MIME format.
--------------080707010306080801090308
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Monique Louise wrote:

>Hi, Daan,
> 
>  
>
>>Note that "under the hood"
>>even .NET and Java use different names for each method ("renaming") to
>>distinguish them.
>>    
>>
>
> perhaps the virtual machine or the JIT compiler use different names
>to resolve overloads, but the code in .NET MSIL, for example, uses the
>same name.
>  
>
Ah yes, but that is because the .NET system still maintains types, ie.
the JIT resolves them in the end. So, if you want to call a .NET overloaded
function, you also need to pass the types of the arguments (which is just
as complicated as "renaming"). I guess that from the Haskell side, you
still need to have unique names for each overloaded version and use the
class system to resolve them. Maybe you can do with a single version where
you pass the types of the arguments too? Maybe with Dynamic of Equality
data types from [1]?

All the best,
-- Daan


[1] Arthur Baars and Doaitse Swierstra, "Typing Dynamic Typing"

> 
>  
>
>>I don't know of any other solution , but you may want to read
>>Andre Pang's master thesis (under supervision of Manuel Chackravarty)
>>that might have some content about this.
>>    
>>
>
>Do you know where I can find that thesis ?
>
>Thanks,
>
>Monique Louise B.Monteiro
>Msc Student in Computer Science
>Center of Informatics
>Federal University of Pernambuco
>_______________________________________________
>FFI mailing list
>[email protected]
>http://www.haskell.org/mailman/listinfo/ffi
>  
>


--------------080707010306080801090308
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Monique Louise wrote:
<blockquote cite="[email protected]"
 type="cite">
  <pre wrap="">Hi, Daan,
 
  </pre>
  <blockquote type="cite">
    <pre wrap="">Note that "under the hood"
even .NET and Java use different names for each method ("renaming") to
distinguish them.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
 perhaps the virtual machine or the JIT compiler use different names
to resolve overloads, but the code in .NET MSIL, for example, uses the
same name.
  </pre>
</blockquote>
Ah yes, but that is because the .NET system still maintains types, ie.<br>
the JIT resolves them in the end. So, if you want to call a .NET
overloaded<br>
function, you also need to pass the types of the arguments (which is
just<br>
as complicated as "renaming"). I guess that from the Haskell side, you<br>
still need to have unique names for each overloaded version and use the<br>
class system to resolve them. Maybe you can do with a single version
where<br>
you pass the types of the arguments too? Maybe with Dynamic of Equality<br>
data types from [1]?<br>
<br>
All the best,<br>
-- Daan<br>
<br>
<br>
[1] Arthur Baars and Doaitse Swierstra, "Typing Dynamic Typing"<br>
<blockquote cite="[email protected]"
 type="cite">
  <pre wrap=""> 
  </pre>
  <blockquote type="cite">
    <pre wrap="">I don't know of any other solution , but you may want to read
Andre Pang's master thesis (under supervision of Manuel Chackravarty)
that might have some content about this.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
Do you know where I can find that thesis ?

Thanks,

Monique Louise B.Monteiro
Msc Student in Computer Science
Center of Informatics
Federal University of Pernambuco
_______________________________________________
FFI mailing list
<a class="moz-txt-link-abbreviated" href="mailto:[email protected]">[email protected]</a>
<a class="moz-txt-link-freetext" href="http://www.haskell.org/mailman/listinfo/ffi">http://www.haskell.org/mailman/listinfo/ffi</a>
  </pre>
</blockquote>
<br>
</body>
</html>

--------------080707010306080801090308--

--===============1578208203==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
FFI mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/ffi

--===============1578208203==--