3 ms·
Duck typing in dynamic languages can allow you to do some pretty cool things.
by LeafyGreenbriar 13y ago
Duck typing in dynamic languages can allow you to do some pretty cool things.
- Peaker 13y agoThe request was for some examples of the claim. You just repeated the claim.
- lmm 13y agoCompared to Java? No question. Compared to Scala with its implicits and associated patterns? I've yet to see a case I couldn't handle in Scala.
- deleted 13y ago[deleted]
- taeric 13y agoAn in place and efficient quick sort? :)
- frowaway001 13y ago??? https://github.com/non/spire/blob/master/core/src/main/scala/spire/math/Sorting.scala https://github.com/non/spire/blob/master/core/src/main/scala...
- taeric 13y agoHa! Fair enough, though I was thinking something different in two ways. Namely, something that worked on the common collections used by people and more readable than this. Still, bad example.
- frowaway001 13y agoThat doesn't make sense. The whole point of quicksort's algorithm is to do things in place, which requires fast indexed access and mutability. Common collections lack both of these things.