Data Transformation
Planned
ROSETTA 05 — Implementation Comparison
Compare pure input-to-output transformations across languages.
Rosetta Stone Data Transformation
Functions receive a value, transform it, and return a predictable result.
Functions receive a value, transform it, and return a predictable result.
Objective & Comparison Rule
Build each implementation without changing the shared behavior or visual target.Objective
Compare pure input-to-output transformations across languages.
Comparison Rule
Functions receive a value, transform it, and return a predictable result.
Keep equivalent input, behavior, and visible output in every later language version.
Implementation Plan
Keep the comparison surface fixed while language syntax and runtime details change.Technologies
Build Instructions
Start with the first technology listed under Technologies, then reproduce the same behavior in each following implementation.Functions receive a value, transform it, and return a predictable result.
Build and run the initial implementation, then save the visible expected result.
Compare syntax, typing, modules, runtime, standard library, data handling, and implementation size.
TypeScript Implementation Reference
This implementation becomes the first concrete Rosetta comparison point.function slugify(value: string): string {
return value
.trim()
.toLowerCase()
.replace(/[^a-z0-9]+/g, "-")
.replace(/^-+|-+$/g, "");
}
slugify("Modern Agenda: Angular");package.json
{
"type": "module",
"scripts": { "build": "tsc" },
"devDependencies": { "typescript": "^7.0.2" }
}tsconfig.json
{
"compilerOptions": {
"rootDir": "./src",
"outDir": "./dist",
"target": "ES2022",
"module": "ES2022",
"lib": ["ES2022", "DOM"],
"strict": true,
"sourceMap": true
},
"include": ["src/**/*.ts"]
}Comparison Dimensions
Record differences that teach language and runtime behavior rather than cosmetic syntax.- Syntax and data declarations
- Typing and validation
- Collections and standard-library operations
- Modules and file organization
- Runtime and build requirements
- Database or HTTP APIs when applicable
- Visible output and behavioral equivalence