|
|
|
|
|
by ellen364
1804 days ago
|
|
It’s early days for CoPilot, but I find myself wondering if it will eventually reduce idiomatic use of languages and increase the stickiness of old practices. In the article, the author included this example: alternate_word_mapping = {words[i]: words_in_english[i] for i in range(len(words))}
That line is probably more readable than the Pythonic enumerate: alternate_word_mapping = {word: words_in_english[i] for i, word in enumerate(words)}
But it superficially reminded me of a style that I see on Leetcode, which rarely uses Python features like enumerate or dict.items.CoPilot was trained on GitHub repos and many repos are mini-projects for learning a new language. Does that mean CoPilot will tend to suggest more generic, less language specific, implementations? If it does, will that change perceptions of what’s idiomatic? And will the volume of old code on GitHub influence CoPilot’s suggestions, making us slow to adopt new language features? |
|
alternate_word_mapping = dict(zip(words, words_in_english))