Apple, apparently, lets you write macOS ObjC code in JavaScript. 0 ▲ Taylor's Notes 125 days ago · 6 min read1122 words · Tech · hide · 0 comments or: for when Electron is just too sensible for you. I like JavaScript (well, TypeScript, but close enough), and I have primarily been using macOS for about 10 years at this point, and as someone who has a penchant for writing the most cursed & evil code possible, I have had multiple attempts to interact with macOS' native APIs from JavaScript. Now, being on macOS makes this interesting, because of ObjC (which to clarify, I use to refer to the runtime & C API exposed by libobjc.dylib, not the Objective-C language it is intended to be used with), which allows almost all APIs on the system to be interfaced with with only a handful of C functions, primarily objc_msgSend, which is what Objective-C's ...'distinctive' [] notation is actually syntactic sugar for. The only problem is that, and this may be a surprise to some of you, but the JS ecosystem is fragmented, so there's a bunch of different FFI libraries and are different in ways that make it hard to write a good abstraction layer, and… No comments yet. Log in to reply on the Fediverse. Comments will appear here.