News for hackers. Stuff that matters.
Re:Sshole by yangm97 on Thursday November 05, 2026 @08:46AM (#50378989)
I would be more concerned about the lack of explicit return types, one of the arguments for strongly typed languages is that you should not have ambiguous data and yet…

Granted I mostly work with high level programming languages so I may be missing something.

Re:Sshole by preg_match on Thursday November 05, 2026 @02:14PM (#50383139)
Yes this is C, C is not strongly typed at all and the type system is very primitive. NULL ptr is the return value you should probably use if something goes wrong. But you can’t, say, return a sum type with the result and an error. It’s not uncommon at all to use magic sentinel values in C to indicate error conditions.