Re:Mio: A High-Performance Multicore IO Manager for GHC [pdf]
by octo_t on Monday August 12, 2013 @07:08AM
(#6198611)
>> OO subtyping is hard to reason about formally in formal systems designed for FP...news at 11!
Well. Even systems like L2 (which are not functional) find subtyping difficult. It becomes difficult in the presence of overloading and overriding.
Re:Mio: A High-Performance Multicore IO Manager for GHC [pdf]
by gngeal on Monday August 12, 2013 @09:01AM
(#6198926)
I believe there's a nice book called Foundations of Object Oriented Languages which dissects the problem in depth.
Re:Mio: A High-Performance Multicore IO Manager for GHC [pdf]
by gtani on Monday August 12, 2013 @10:15AM
(#6199264)
Pierce's TAPL, also, and Harper's Practical Foundations. There's also some things i've seen about how scala does it, but I'll have to dig for them
Re:Mio: A High-Performance Multicore IO Manager for GHC [pdf]
by octo_t on Monday August 12, 2013 @10:41AM
(#6199448)
See also the DOT calculus[1] (Dependent Object Types) being the basis for a new foundation for scala's type system
Re:Mio: A High-Performance Multicore IO Manager for GHC [pdf]
by dubbledidu on Monday August 12, 2013 @08:09AM
(#6198738)
OO subtyping is hard to reason about formally in formal systems _in general_.
Re:Mio: A High-Performance Multicore IO Manager for GHC [pdf]
by seanmcdirmid on Monday August 12, 2013 @09:25AM
(#6199030)
And yet, is-a and has-a relationships predominate natural language. Well, it makes sense: natural language is hard to reason about formally also.
Re:Mio: A High-Performance Multicore IO Manager for GHC [pdf]
by Tyr42 on Monday August 12, 2013 @12:21PM
(#6200011)
The problem isn't that `is-a` is hard, it's the divergence of `is-subtype-of` and `is-subclass-of`. Take a look here, I think it explains it rather well.
http://okmij.org/ftp/Computation/Subtyping/
Re:Mio: A High-Performance Multicore IO Manager for GHC [pdf]
by seanmcdirmid on Monday August 12, 2013 @11:06PM
(#6203788)
I would argue that nominative subtyping is natural (basically sub-classing), since it matches our ability to assign arbitrary meaning and relationships to words, which is incredibly useful when having a conversation. Ya, maybe a set isn't exactly a bag, but close enough. Birds mostly fly, but penguins don't, we can deal with that.
But the main problem with subtyping, nominative or structural, is how it messes up Hindley-Damas-Milner style type inference. But that shouldn't be surprising that an FP theory for type inference wouldn't work well for OOP.
OO subtyping is hard to reason about formally in formal systems designed for FP...news at 11! I jest.
The reason FP does so well academically is that no one knows how to rigorously evaluate something that isn't theoretical (since FP is close to math anyways) or performance-based (most other PL work).
The Haskell crowd is also very creative so they do a lot of cool stuff. However, many of their ideas are transferrable to other languages without the FP ideology.
The OO people have something to offer also, but we've been kind of muted lately.