Translation between languages
Translate this code from [SOURCE LANGUAGE] to [TARGET LANGUAGE], maintaining the same functionality and following the idiomatic conventions of the target language (not a literal translation). Code: [CODE]. Point out the main differences in approach between the two languages.