Arc Forumnew | comments | leaders | submit | riffraff's commentslogin
1 point by riffraff 6124 days ago | link | parent | on: Object Oriented Arc

Maybe, well, the usual polymorphic dispatch? Take the tipical "foreach" loop in ruby/python/java/c# for var in list dostuff

all rely (through coroutines, lambdas, side effects) on the list to know how to be iterable. If you change from a cons list to an array/file/socket/prime generator it will still work.

Of course, perfectly doable with, say, haskell type classes, but I don't know how to it in arc. Any hints?

-----