draw_line :: CGFloat -> CGFloat -> CGFloat -> CGFloat -> IO () draw_line x y x' y' = do c <- _UIGraphicsGetCurrentContext _CGContextBeginPath c _CGContextMoveToPoint c x y _CGContextAddLineToPoint c x' y' _CGContextStrokePath c
, the Haskell one isn't terribly different from the original Objective-C code. By building FFI agains the iPhone SDK, Objective-C code can be kept both minimal and functional.
I really began to feel that Cocoa is indeed very nicely designed, and those design patterns for Objective-C are just about right for building GUI.