Ad
  • Custom User Avatar

    Got this one first try, really I just had to follow whatever error message my IDE was saying ^^
    But the comments are better than for isomorphism IMO, and I know what was the mindset of the kata, so I can't complain x) and it's always satifaying to go from red to green ^^

  • Custom User Avatar

    [solved in rust]

    I did this kata by just writing the simplest code I could to make it compile, and then understand the little tricks about iso_un_option, iso_eu.
    I must say I don't really understand what's this kata supposed to teach you... I did learn stuffs though, being new to rust, I understood the concept "catpuring" closures / move + closure, which seems really useful.
    But besides that I don't really get it. Ok, if you have a bijection between A U {None} and B U {None}, then you have a bijection between A and B. But I can prove that pen & paper in 3 minutes, no need to sratch my head writing un-readable code just guided by the IDE/rust-analyser error messages...

    My conclusion is that: you should write what's the purpose of the kata in the description.
    Is it to prove some (failrly basic) isomorphisms' properties using code/type systems?
    For me, "We will walk through the definition of isomorphism and define some common isomorphisms" is too vague, and personnaly it generates frustration. Please write of few more lines of description.

    Also, the comment "Going the other way is hard (and is generally impossible) ... You need this to prove some cases are impossible." felt fairly confusing. Something like "Nothing forbids Some(a) to map to None" would have been much clearer (without give it away).
    Same for "inf + 1 = inf + 0", you need to be somewhat aware of specific ways of "building integers" to understand this, which feels a bit sad for people who don't.

    Sorry to be harsh, I know you've spent time on this.

    Now that I have understand the mindset, I might try the follonw ones, and even enjoy it. But that would have helped to get that from the description.