News for hackers. Stuff that matters.
Re:GCC now includes Modula-2 and Rust. Do they work on OpenBSD? by jaas on Monday December 19, 2022 @03:23PM (#34057154)
The OS X platform code for Firefox is written in Objective-C++. It's not without issues, but overall it's a nice way to use Objective-C from within a larger C++ code base. I didn't find it difficult to work with, particularly as opposed to what we'd have to do if Objective-C++ didn't exist.

If you want to see what this looks like, look at the .mm files here:

https://github.com/mozilla/gecko-dev/tree/master/widget/coco...

If you want a specific file to look at with good examples of how this works, here's one:

https://github.com/mozilla/gecko-dev/blob/master/widget/coco...

Basically what you're looking for is being able to make Obj-C calls (e.g. [[ChildView alloc] initWithFrame:r geckoChild:this]) from within what is otherwise normal C++, and vice-versa.

Re:GCC now includes Modula-2 and Rust. Do they work on OpenBSD? by MBCook on Monday December 19, 2022 @04:26PM (#34057949)
Thanks! I remember hearing it existed long ago but I’ve never heard of it being used. Great explanation.
Re:GCC now includes Modula-2 and Rust. Do they work on OpenBSD? by scrame on Tuesday December 20, 2022 @04:26PM (#34072828)
Ahhh, that makes sense. So you can have a cross platform c++ and then bind cocoa. Thanks!