Convert Code Between Languages
Convert code between any programming languages while maintaining idiomatic patterns and best practices.
๐ The Prompt
Convert the following code from [SOURCE LANGUAGE] to [TARGET LANGUAGE].
Source code:
```[SOURCE LANGUAGE]
[PASTE YOUR CODE HERE]
```
Requirements:
1. Use idiomatic [TARGET LANGUAGE] patterns
2. Preserve original logic and functionality
3. Use equivalent libraries/packages
4. Follow naming conventions
5. Add comments where translation isn't straightforward
6. Handle language-specific differences
Note any features without direct equivalents and explain workarounds.
๐ก Tips for Better Results
Mention specific libraries you want in the target language.
๐ฏ Use Cases
Language migration, learning new languages, polyglot development.
๐ Related Prompts
๐ป Coding
beginner
Explain Code Like Im a Beginner
Get any code explained in plain English with line-by-line breakdowns, analogies, and learning suggestions.
๐ป Coding
beginner
Debug My Code and Explain the Fix
Get your code debugged with clear explanations of what went wrong and why, plus the corrected version.
๐ป Coding
intermediate
Write Unit Tests for My Code
Generate thorough unit tests covering edge cases, error handling, and both positive and negative scenarios.
๐ป Coding
intermediate
Write a REST API Endpoint
Generate production-ready REST API endpoints with validation, error handling, and documentation.
๐ป Coding
advanced
Refactor Code for Better Performance
Get your code refactored for better performance with Big O analysis and design pattern suggestions.
๐ป Coding
advanced
Create a GitHub Actions CI/CD Workflow for Automated Testing and Deployment
Generate a complete GitHub Actions CI/CD workflow with build, test, deploy, and notification jobs for your project.