Skip to content

Comment on Objective-C Lessons from Goparent

Comments

Go is procedural and Objective-C is object-oriented

I'm not sure that Go is entirely procedural - types and type embedding mean it also has concept of tying data and functions which operate on that data together, controlling access etc.

The type system in Go fits nicely with some similar ideas in Objective C - Obj-C Protocols are similar to interfaces (though in Obj-C they are explicitly declared and adhered to, unlike Go), and Categories are similar to Type Embedding in Go (though there are differences of course). So those two ideas of duck-typing and composition work across both languages, though obviously there are differences in that Obj-C has a more traditional Object inheritance model as well.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.