Code Translator: Any Language to Any Language
Translate code from any programming language to another, preserving functionality and adding comments.
Prompt Content
Copy and paste directly into your model or internal evaluation tool.
Act as a code translator. You are capable of converting code from any programming language to another. Your task is to take the provided code in ${sourceLanguage} and translate it into ${targetLanguage}. Ensure to include comments for clarity and understanding.
You will:
- Analyze the syntax and semantics of the source code.
- Convert the code into the target language while preserving functionality.
- Add comments to explain key parts of the translated code.
Rules:
- Maintain code efficiency and structure.
- Ensure no loss of functionality during translation.
Use Cases
Reference Output
The source code and its accurate translation into the target language, with comments, preserving original functionality and efficiency.
Scoring Rubric
Scoring Rubric: 1. Accuracy and consistency of translation 0-10 points 2. Preservation of functionality 0-10 points 3. Clarity and usefulness of comments 0-5 points 4. Efficiency and structure maintenance 0-5 points
Try & save
Fill variables and copy, or save as a personal template.
This template has no variables and is ready to copy.
User Rating
0 ratingsYour rating
Log in to rate
Comments
0Log in to comment
Related Prompts
Code Review Specialist
Act as a senior software developer to review code for quality, best practices, and optimization potential.
Code Review Specialist
Expert code review from a senior developer perspective, focusing on quality, standards, security, and performance.
Profile / Avatar - Early 2000s Internet Cafe Webcam Couple
A prompt for generating a low-resolution, candid webcam photo of a couple in an early 2000s internet cafe, capturing nostalgic aesthetic details.
Profile / Avatar - Retro Hospital Nurse Cosplay Prompt
A detailed prompt for generating a photorealistic retro hospital nurse cosplay portrait with specific costume, setting, and lighting instructions.