News for hackers. Stuff that matters.
Re:Writing a JPEG Decoder in Rust – Part 2: Implementation I by masklinn on Friday August 19, 2016 @01:10PM (#12321581)
Yeah though there's something a bit sad to the lack of variable-arity zip/map as you'd find in dynamically typed languages e.g. in Clojure:

    (mapv HuffmanCode. code_lengths code_table data_table)
I don't know if even dependent types would allow for that, given the (variable number of) arguments are all different types.
Re:Writing a JPEG Decoder in Rust – Part 2: Implementation I by lmm on Friday August 19, 2016 @04:35PM (#12323264)
It's straightforward with dependent types, unless the language treats multiple arguments (or functions of multiple arguments) specially. In my Scala example in the sibling thread the ().zipped is sort-of-language-level, but one could easily implement the same thing using a HList instead of a tuple; turning the function into a function that accepts a HList requires language-level support or a (standardized) macro but it wouldn't in a Haskell-like language where a function of multiple arguments is curried by default.