Convert Code Between Languages

An idiomatic port, not a transliteration — with anything that doesn't translate flagged rather than faked.

Intermediate1 min read

Customize

Fill these in and the prompt below updates as you type. Anything you leave blank stays as a placeholder.

Your prompt

4 placeholders left
Convert this {{source_language}} code to idiomatic {{target_language}}.

{{code}}

Requirements: preserve behavior exactly; use {{target_language}}-idiomatic patterns and the standard library, not a literal line-by-line transliteration; target {{target_version}}.

Flag anything that does NOT translate cleanly (no equivalent API, different error model, etc.) instead of faking it.

Similar prompts

Modernize an API Call Incrementally

Migrate off a deprecated dependency one file at a time, stopping the moment tests fail.

Add Types Incrementally

Type one file with runtime behavior frozen, and make the type-checker output the proof.

Break a God Function Apart

Split an oversized function into well-named pieces without changing external behavior.

Fix a Bug Without Breaking Things

Find every affected code path and the same bug elsewhere before landing the minimal fix.