2

This question:

How to read Finder icons (left source list) on OS X using Swift

received an awesome answer in Objective-C by @ken-thomases.

When I wanted to use it in Swift I realized it wasn't a trivial translation so I posted my Swift version as an answer, with attribution to Ken's answer.

Is it ok to do what I did?

I've got Ken's approval so I'm ok with this answer, but I'm still not sure if this is ok in general.

Before asking this question here I've read this one:

Is it acceptable to copy old Objective-C answers just to rewrite them in Swift?

and a few 'similar' other ones, but I felt like they didn't really answer this specific situation where the translation needed some work.

5
  • Actually, this question is a duplicate of the meta-question you linked, and I stand by my answer there. Just a note on your answer on main: It would definitely be better if you add some explanation. Do not rely on the source to stay available! Aug 1, 2015 at 14:08
  • And what I feared (the motivation behind this question on meta) just happened: OP has accepted my translation instead of Ken's original. // I've read again the linked meta question and... ok, my question is a dupe but I'm still a bit lost about this...
    – Eric Aya
    Aug 1, 2015 at 14:13
  • Well, his answer may be good for solving the problem in objective-c (I take your word for it), but it does not answer the question, as that only wants for swift. Sure, people who know both can translate (at least you can), but that does not change anything. Aug 1, 2015 at 14:24
  • See meta.stackoverflow.com/questions/285258/… for the inappropriateness of answering [Xlanguage]-questions in [Ylanguage], even if one of them is designated as the heir to the other by some powerful company. Aug 1, 2015 at 14:31
  • I've followed your advice an added the explanations for my translation in my answer on SO. I feel better about this now. Thank you for these comments and links.
    – Eric Aya
    Aug 1, 2015 at 14:33

1 Answer 1

3

Per the other meta discussions: It's perfectly fine to do even if it doesn't require a lot of work, but:

  • You should only post it to a question asking for swift code1. If it requires non-trivial amount of work it's perfectly fine to rewrite the question for swift and self-answer it with the code.
  • You need to attribute the original answer.

1 Yes, I am aware that in this case the question was asking for swift and the Object C answer was a non-answer. Just wanted to answer the general question you posed here.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .