microsoft / TypeScript

TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
https://www.typescriptlang.org
Apache License 2.0
101.33k stars 12.54k forks source link

Allow custom keywords to make it easy for children in different languages to contact typescript for simple computational experiments #31256

Open Akimotorakiyu opened 5 years ago

Akimotorakiyu commented 5 years ago

Search Terms

custome keywords

Suggestion

Allow custom keywords to make it easy for children in different languages to contact typescript for simple computational experiments

This requires a keyword standard in different language environments. Unfortunately, no standardization organization has set standards for it, and because of the inaccuracy of translation, there is not even a recognized standard.

Use Cases

Let children play with programming. eg: lingascript (Multilingual Javascript, based on Typescript) chinese keywords typescript, use cases of chinese keywords typescript Japanese keyword javascript nadesiko3

Examples

//English
function sum(a:number,b:number):number{
    return a+b;   
}
//Chinese
函数 加和( a:数字, b:数字) :数字{
    返回 a+b
}
//Russian
функция суммировать( a:цифра, b:цифра) :цифра{
    возвращение a+b
}
//Japanese
関数  和を加える( a:数字, b:数字) :数字{
    戻る a+b
}

... etc.

Checklist

My suggestion meets these guidelines:

gasolin commented 5 years ago

Could achieve via wrapping the keyword mapping functions to a separate file, like this https://github.com/gasolin/lingascript/issues/18

Akimotorakiyu commented 5 years ago

This requires a keywords standard in different language environments. Unfortunately, no standardization organization has set standard for it, and because of the inaccuracy of translation, there is not even a recognized standard.