On Jan 4, 2008 8:39 AM, David Brown <[EMAIL PROTECTED]> wrote:
> On Fri, Jan 04, 2008 at 01:34:10AM -0800, Chuck Esterbrook wrote:
>
> >> I like what Hindley-Milner type-inference brings, but it has it's
> >> disadvantages, too, such as very cryptic error messages.
> >
> >Not clear if you guys already noticed this, but Cobra supports *both*.
> >The first language I encountered such support in was Objective-C and I
> >liked it a lot.
>
> I don't think you do Hindley-Milner type-inference.  You infer types of
> variables so that they don't have to be declared.  That's quite a bit less
> than H-M, which does type inference of _everything_, with polymorphism and
> lots of nifty stuff.

I agree. Cobra does not do Hindley-Milner type-inference. It's
type-inference is a shortcut for declarations, as you pointed out. Its
support for dynamic binding enables it to act like Python or Smalltalk
where variables and expressions do not have compile-time types.

-Chuck

-- 
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to