I’ve recently seen multiple questions clearly tagged with either swift or Objective-C and answers being given in either, the “other” language or both languages. If a swift tagged question is answered with both Objective-C and swift code to a degree that the swift code gets lost between the Objective-C code. Is it acceptable to edit the question and get rid of the Objective-C code to make the swift code more readable?
Or is the better option to separate the both and explain the answer twice for both languages?
I’ve been editing these questions and most often have removed the Objective-C code, I’d like to know if this is the “way to do it”
-
Related: meta.stackoverflow.com/questions/285258/… meta.stackoverflow.com/questions/287600/…– DeduplicatorMar 12, 2015 at 22:58
-
Do you have any examples?– Matthias BauchMar 13, 2015 at 1:52
-
1I think for any situation, unless code is meant to be run together (like HTML embedded in PHP for example), then it should be in separate code blocks. Alternatives should be separated. You probably don't have to go overboard on duplicating the explanation either. Just a simple "and this is how it looks in Swift instead" would work most of the time.– JasonMArcherMar 13, 2015 at 7:09
Add a comment
|