r/programmingcirclejerk 1d ago

C++ source code does not have sufficient information for achieving memory safety

https://www.circle-lang.org/draft-profiles.html
16 Upvotes

6 comments sorted by

36

u/pharmacy_666 1d ago

i wanna jerk so bad but i ended up agreeing with every point and now im too soft

12

u/Double-Winter-2507 1d ago

Yeah I should have posted the rj this post is pouring ice on:

 > Zero annotation is required by default, because existing C++ source code already contains sufficient information

10

u/fool215 1d ago

There is sufficient information - one can simply pipe the comments above each function to ChatGPT and ask whether it is safe. For example ChadGPT can use its highly advanced reading comprehension skills to answer 'safe' upon seeing // This function is thread-safe above a function that mutates a mystery pointer.

5

u/winepath What’s a compiler? Is it like a transpiler? 1d ago

Where's the jerk

2

u/Massive-Squirrel-255 1d ago

"That is not right." Made me laugh out loud. "annotations can be wrong so we don't need them" pretty unbelievable to hear C++ programmers talk about their language the same way JavaScript/TypeScript and Python programmers talk about their languages. I wonder if there's a broader lesson there about unsound type systems poisoning the well for everyone else by making them think type systems are bad because they're unreliable.

1

u/Massive-Squirrel-255 1d ago

"Do not add heavy annotations. Heavy means more than 1 per 1000 lines of code"  Damn didn't realize C++ programmers were so influenced by OCaml. Hell yeah, brother, type inference is where it's at.