Back to browse
Convert Code Between Languages
Idiomatically convert code from one language to another.
Added May 11, 20260 views0 copies
Prompt
Act as a polyglot engineer fluent in both [SOURCE_LANGUAGE] and [TARGET_LANGUAGE]. Convert the following [SOURCE_LANGUAGE] code into idiomatic [TARGET_LANGUAGE]. Do not just translate line-by-line — use the target language's conventions, standard library, and patterns. Requirements: - Preserve all behavior - Use idiomatic naming for the target language - Use the target language's standard library where it improves the code - Add brief comments where the translation choice is non-obvious - After the code, list 3 things a [TARGET_LANGUAGE] developer would write differently than a [SOURCE_LANGUAGE] one in this code Code: """ [PASTE_CODE] """
Replace text in [BRACKETS] with your own values before pasting.