3 ms·
Can we get multiple dispatch too? Or is - MD considered an anti-pattern these days? - This no longer 'hinting'
by suvelx 12y ago
Can we get multiple dispatch too?
Or is
- MD considered an anti-pattern these days?
- This no longer 'hinting'
- kibwen 12y agoI don't think anyone considers multidispatch to be an anti-pattern. Here's Guido himself emulating multimethods in Python via decorators: http://www.artima.com/weblogs/viewpost.jsp?thread=101605 http://www.artima.com/weblogs/viewpost.jsp?thread=101605 They're certainly a bit obscure though. Julia is the only new language that I'm aware of that prominently features multiple dispatch as a first-class language feature: http://julia.readthedocs.org/en/latest/manual/methods/ http://julia.readthedocs.org/en/latest/manual/methods/
- ptx 12y agoNim also supports them: http://nim-lang.org/manual.html#multi-methods http://nim-lang.org/manual.html#multi-methods