See the attached proposal for rust style error handling types. In the email thread, a guy said the working group members are "very interested". I also saw a furry on twitter advocating for slices as a primitive in C. My prediction is that all of these s adding r-slurred features will succeed (see C23's nullptr, _Generic) since there are no non-autists in these groups.
!codecels discuss
Jump in the discussion.
No email address required.
In literally every programming language that isn't rust, evangelist of the church of ferroxide spread their belief and try to convert nonbelievers by trying to introduce rust like feautures, they truly are annoying and cancerous
Jump in the discussion.
No email address required.
First thing I wanted to do when I came back to Java after some months playing with rust was the result object...
Jump in the discussion.
No email address required.
Jump in the discussion.
No email address required.
More options
Context
More options
Context
More options
Context
Who cares about C if you're not working on an embedded system or an OS
For everything else RUST is the future, just look how much drama they produce
Jump in the discussion.
No email address required.
the rust s shall inherit the earth
Jump in the discussion.
No email address required.
More options
Context
More options
Context
I am currently trying to learn C so that I can have an easier time reading the dinosaur book. How will this affect me?
Jump in the discussion.
No email address required.
Not at all. These changes will arrive in 5 years, and fully implemented in compilers in 10. You'll just have to deal with marginally more shittines & complexity in the future.
It never even began for you. Every book I have seen (yes, including the og k&r C book) teaches you nonsense.
Jump in the discussion.
No email address required.
And will arrive in production code another 20 years down the road, if ever.
Jump in the discussion.
No email address required.
embeddedchads still write c89
Jump in the discussion.
No email address required.
More options
Context
More options
Context
I learn by googling how to do syntax and every time I reach a point on my coding where I wonder how to do something I google how to do it.
Jump in the discussion.
No email address required.
More options
Context
huh?
Jump in the discussion.
No email address required.
Most books teach you some very basic syntax & semantics as well as the standard library, which is completely r-slurred to the point of being unusable for serious work. They typically teach a certain style of programming reminiscent of a desugared C++ or rust, which is worse than just using a vanilla programming language.
Jump in the discussion.
No email address required.
More options
Context
More options
Context
More options
Context
learn D
Jump in the discussion.
No email address required.
More options
Context
More options
Context
Lol who cares
Imagine using C when Rust exists
Jump in the discussion.
No email address required.
More options
Context
Don’t most c code bases just use c98 or w/e?
I thought a benefit was it was a known quantity and didn’t change. I mean - there are new versions but people explicitly avoid them for “portability” (never know when you’ll need to compile on Solaris).
Follower of Christ Tech lover, IT Admin, heckin pupper lover and occasionally troll. I hold back feelings or opinions, right or wrong because I dislike conflict.
Jump in the discussion.
No email address required.
Linux moved to C11 a while back. The world won't be on C99 (realistically, gnu99/gnu89) forever.
Jump in the discussion.
No email address required.
Are you sure though? People seem convinced that targeting Solaris and AIX is a real thing that happens in 2023.
Follower of Christ Tech lover, IT Admin, heckin pupper lover and occasionally troll. I hold back feelings or opinions, right or wrong because I dislike conflict.
Jump in the discussion.
No email address required.
i think its a larp. I've never actually seen it happen, linux rules the world except on a few embedded things. And even if it were true, solaris 11.4 from 2018 added C11 support according to google search.
Jump in the discussion.
No email address required.
I was "trolling" but I have totally run into people who feel that targeting c99 because there might be Solaris systems from '01 is a valid consideration
Follower of Christ Tech lover, IT Admin, heckin pupper lover and occasionally troll. I hold back feelings or opinions, right or wrong because I dislike conflict.
Jump in the discussion.
No email address required.
More options
Context
More options
Context
More options
Context
More options
Context
More options
Context
Errno was an understandable mistake, but C already has a great way of error handling: any function that can possibly error out returns an int zero for success, non-zero for error.
It looks like they are repeating the mistake of C++ exceptions of letting you throw / error-return any type. One guy I used to work with liked to
throw 1
and shit like that all the time. His code got thecatch (...) {}
to at least log that it had thrown something unrecognizable and die. Then another guy liked to usedpthread_cancel()
for some reason. Turned out the cancel implementation used the same exception stuff underlying the C++ exceptions implementation, so the...
caught on the thread cancellation and broke everything.Jump in the discussion.
No email address required.
More options
Context
There are people who use anything but c99?
Jump in the discussion.
No email address required.
More options
Context
Snapshots:
archive.org
ghostarchive.org
archive.ph (click to archive)
email thread:
archive.org
ghostarchive.org
archive.ph (click to archive)
Jump in the discussion.
No email address required.
More options
Context
nullptr
is a legitimately good change._Generic
is just ersatz function overloading, which is sometimes useful and has been in C in the form of type-generic math since C99.Jump in the discussion.
No email address required.
More options
Context
Just use c99 forever
Jump in the discussion.
No email address required.
More options
Context
Chris Chan?
Jump in the discussion.
No email address required.
More options
Context
This is from 2018 and it depends on herbceptions so it cannot go through unless that does. I find it highly unlikely this feature will make it, even though I actually think it looks pretty reasonable.
Those are good things.
Jump in the discussion.
No email address required.
More options
Context
can someone summarize what this is doing. I have a basic understanding of programming languages
Jump in the discussion.
No email address required.
In C your function returns a value of the declared type using the return statement.
This is declared to return
int
with the result. If you give it 0, it will crash.In this new thing, there is an additional type declaration for an error return channel.
Then when you use this you have to do something like
_Either(int, char) result = _Catch(divideAMillionBy(5))
, check ifresult
came through a normalreturn
or through areturn _Failure()
, and appropriately access theint
orchar
contained inresult
. (They seem to be changing around the names for using_Either
so I left them out here.)There's not much value to having the 'F' returned here, but from a quick skim I didn't see whether or not
_Fails(void)
would work.For a C specific note, if you ever end up actually using this you probably won't see much
_Failure
or_Either
- C has a pattern of adding new things to the underscore-prefixed namespace that is reserved for the standard and then providing a header file that aliases them with more convenient names. This is to make it easier on an existing codebase that already uses the nameFailure
orEither
Jump in the discussion.
No email address required.
You had a chance to not be completely worthless, but it looks like you threw it away. At least you're consistent.
Jump in the discussion.
No email address required.
More options
Context
More options
Context
Read "1. Introduction" of the pdf.
Most important: "C code would directly understand that a C++ function it called had failed ? moreover, C code would be able to return exception throws to C++ code."
Basically C and C++ can communicate more with each other.
Jump in the discussion.
No email address required.
I don't get it I thought that was a good thing
Jump in the discussion.
No email address required.
people complain for no reason whenever anything is added to C because it punctures their delusion of writing "portable assembly" like a leet low-level programmer
Jump in the discussion.
No email address required.
More options
Context
More options
Context
More options
Context
More options
Context