4 ms·
The Python code isn’t even that good. Values are assigned to variables, which are returned in the next line.
by pyuser583 4y ago
The Python code isn’t even that good. Values are assigned to variables, which are returned in the next line.
- zdenham 4y agoI agree, the python code is not good at all, and at the moment would not work for any realistic application. The issue is more with the premise of an AI writing code potentially harmful to humans, especially it gets better
- majewsky 4y agoThat's not even a premise, that's just daily life if you substitute "an AI" with "humans". This is the weirdest part of the AI craze to me. People write thinkpieces wondernig what happens if we construct a machine that acts against the interest of humanity, even though we already have constructed plenty corporations that do just that.
- delusional 4y agoNot just corporations. We have created an entire societal system that's fundamentally uninterested in people, but relies on us tentatively aligning the interests of global capital to our political human goals. We are already living in the "AI apocalypse", that's why the story has so much emotional weight. We all know how it feels when the system optimizes away something we like, when we get run over by an inhuman institution. The AI nerds need to stop taking the AI stories so literally.
- mr_mitm 4y agoWhy is that bad?
- deleted 4y ago[deleted]
- kivle 4y agoI do agree that it's probably unnecessary here, but in many cases assigning to variables can be a good thing in the name of readability. You can give the variable a name, explaining it's purpose. If you directly return an expression, the reader will have to parse and understand the purpose of the expression to understand the context.
- OJFord 4y agoAs of 3.10, the walrus operator is your friend if you really want to name to explain: return cached_foobar := cache.get("foobar").data