Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I am not a fan of slowing something down, but in the multi-method dispatch example, unless it was being exercised in a tight loop (which would seem very much like a single thread CPU bound scenario which is already a problem), then it wouldn't be exercised often enough to make a big impact. That's just my gut feeling based on my experiences.

But if this really is a big deal, then it would be fair to consider the other language features which do not contribute to the reliability, scalability, and other core Erlang/BEAM features. For example, what is the cost of pattern matching in general? Doesn't that add considerable overhead, just for the benefit of making code cleaner? If that's acceptable, then I don't see why "just one more" feature - in this case a homegrown multi-method dispatch across modules - should be considered non-performant.



Good point about the tight loop. For the other part, my gut feeling would be that there is a "base language" that most developers are familiar with, and accept the performance/other things tradeoffs of, but for more obscure features, people are explicit about these points because they are less known.


Pattern matches should execute in linear time in the worst case worst. Generally you want to place the most likely and specific matches first.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: