tc39 / tg5

TC39-TG5: Experiments in programming language standardization. https://ecma-international.org/task-groups/tc39-tg5/
19 stars 1 forks source link

Studying Programming Language Drift #14

Open codehag opened 1 month ago

codehag commented 1 month ago

One common pattern for proposing new language features is the statement "X is a popular feature in Language Y". Some examples of this include pattern matching, logical assignment, several regex features, etc. Classes, notably, were introduced to JavaScript because Java had them, even though JavaScript is a prototype based language.

JavaScript has also been influential in pushing new patterns into other languages. Async/Await is a pattern that has part of its popularity from JavaScript, was later added to Rust. Promises are also a pattern that was popularized in JS (though originating elsewhere).

Linguistic drift Is a phenomenon in natural languages whereby the language changes unconciously over time. One form of linguistic drift is cross-language linguistic drift. From Wikipedia:

[An] underlying cause of drift may be crosslinguistic influence (CLI) in situations of language contact. For example, in Shanghai Chinese (Shanghainese) it has been reported that vowel sounds have gradually changed over time due to the influence of Mandarin Chinese (Yao & Chang, 2016). At a shorter timescale (weeks of intensive exposure to a second language) as well, phonetic changes have been observed in an individual's native language; these changes, termed 'phonetic drift', generally approximate properties of the second language.

The proposal of this study is to track, on a feature by feature basis, how features drift from language to language. When they work, and when they don't and what factors of the host language enable a feature to function successfully.

This work was started by Yulia Startsev (thats me, you know where to find me) and Felienne Hermans (@felienne). There are several subprojects here if anyone wants to get involved.

Jack-Works commented 1 month ago

I am interested to see this done, but I only know JavaScript :eyes:

codehag commented 1 month ago

You can still look into this if you want! It will require some searching and learning. Some good starting points you will find in the TC39 proposals themselves, where implementations in other languages are listed. So one way to approach this would be go through every proposal and link it to implementations in other languages, how similar they are etc. Maybe you can also work on it with someone.