3 ms·
Multiple dispatch (it can be thought of as OOP on steroids) is particularly helpful for generic programming. It helps write really elegant Code with maximum reu
by ssivark 5y ago
Multiple dispatch (it can be thought of as OOP on steroids) is particularly helpful for generic programming. It helps write really elegant Code with maximum reuse. I think Julia is the only contemporary language built around this. Some Lisp variants support this idea to different extents, with bolted-on features.
- karmakaze 5y agoIt's funny how OOP these days is taken to mean class-based with the popularity of C++ and Java. The proper/original OOP was all runtime and object based, rather than compile-time/type-based.
- watersb 5y agoObjective-C is an attempt to bring SmallTalk/Actor to C programming. https://news.ycombinator.com/item?id=21833331 https://news.ycombinator.com/item?id=21833331 I haven't yet tried to tweak a Swift macOS program, but in OS X era you could inject extra message handlers (object "methods") to a binary executable at runtime. So I don't know how well this year's Swift relates to a SmallTalk model.