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

Arrays are not sequences in Scala. They are Java arrays, not Scala sequences.


Yes, I picked this up, and was not making any statement against that. In fact I do not subscribe to the validity of his approach. But I gave a shot at seeing if I could give code that was succinct and matched.

The requirement was to add a method that works for all collections, whether platform or language specific, while preserving type. The code I gave is an approximation of a solution - to use a rough analogy: topologically speaking the code matches but loses the geometry. The code I gave works on basically all .NET collections, whether C# or F#, string or tree - as long as they implement the interface - they are matched. That it leverages the existing organization should not count against it. The failing is that although types are preserved it is under a new geometry or structure.




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

Search: