News for hackers. Stuff that matters.
Re:Urgent Upcoming OpenSSL release patches critical vulnerab... by nine_k on Saturday October 29, 2022 @02:02AM (#33381411)
What makes Zig safer than Go, to your mind?
Re:Urgent Upcoming OpenSSL release patches critical vulnerab... by valenterry on Saturday October 29, 2022 @02:56AM (#33381688)
Features such as sum types (enums) that you can pattern match on. Or generics (well now Go got them as well, for a reason).

Maybe it doesn't immediately sound as if this is related to security, but it is. If it is hard to model your data and hard to work with it, then people will go the "easy and fast" path.

Think Java: for each type you have to create a new file. Even with modern tooling that is still annoying. So people often shortcut and just use "String". Now you have "String password" and "String userid" and you can swap it up and print the password by accident. Artificial example, I know, but I hope it explains what I mean in general.

Re:Urgent Upcoming OpenSSL release patches critical vulnerab... by pjmlp on Saturday October 29, 2022 @08:43AM (#33383561)
No you don't, only for public types , types internal to the package can stay on the same file.
Re:Urgent Upcoming OpenSSL release patches critical vulnerab... by cesarb on Saturday October 29, 2022 @11:12AM (#33384716)
> Think Java: for each type you have to create a new file.

That's untrue, Java has inner classes, and they can even be public. A "public static" inner class is nearly indistinguishable from a normal top-level class (the only real difference is that its name in the bytecode has a $ character separating the names, that is, its name in the bytecode ends up being something like "org.example.Outer$Inner").

Re:Urgent Upcoming OpenSSL release patches critical vulnerab... by valenterry on Saturday October 29, 2022 @02:18PM (#33386610)
Well, you still have to define them inside of another class then and have to find one that makes sense. They also have an reference to the outer class which might not be desirable.

That being said, it maybe makes it slightly better, but I hope you agree that this is still very much a supoptimal solution and probably comes from a time where searching filenames was the best way to navigate code in the lack of modern IDEs.