News for hackers. Stuff that matters.
Re:Copilot regurgitating Quake code, including sweary comments by pjmlp on Friday July 02, 2021 @12:23PM (#27713546)
Rust I agree, Python not really as the language doesn't provide any way to keep invariants.
Re:Copilot regurgitating Quake code, including sweary comments by adwn on Friday July 02, 2021 @12:53PM (#27713946)
> Python not really as the language doesn't provide any way to keep invariants

Again, how is that relevant? If there's no way to enforce an invariant in custom data types, then there's also no way to enforce invariants in code using built-in data types.

Re:Copilot regurgitating Quake code, including sweary comments by pjmlp on Friday July 02, 2021 @02:20PM (#27714919)
It is surely relevant.

Rust provides the mechanisms to enforce them, while in Python, like all dynamic languages, everything is up for grabs.

Re:Copilot regurgitating Quake code, including sweary comments by adwn on Friday July 02, 2021 @03:43PM (#27715922)
What I meant [1] was: In Python, invariants are enforced by conventions, not by the compiler. If that's not suitable for a given use case, then Python is entirely unsuited for that use case, regardless whether it provides built-in decimal types or user-defined decimal types. That's why I said that your objection regarding invariant enforcement is irrelevant to this discussion.

[1] (but was to lazy to write out)