News for hackers. Stuff that matters.
Re:Ladybird: Closing this as we are no longer pursuing Swift... by PaulDavisThe1st on Wednesday February 18, 2026 @08:17PM (#47068710)
I've never written whole applications in ObjC but have had to dabble with it as part of Ardour (ardour.org) implementation details for macOS.

I think it's a great language! As long as you can tolerate dynamic dispatch, you really do get the best of C/C++ combined with its run-time manipulable object type system. I have no reason to use it for more code than I have to, but I never grimace if I know I'm going to have to deal with it. Method swizzling is such a neat trick!

Re:Ladybird: Closing this as we are no longer pursuing Swift... by bunderbunder on Wednesday February 18, 2026 @09:31PM (#47069176)
It is, and that’s part of what I loved about it. But it’s also the kind of trick that can quickly become a source of chaos on a project with many contributors and a lot of contributor churn, like we tend to get nowadays. Because - and this was the real point of Dijkstra’s famous paper; GOTO was just the most salient concrete example at the time - control flow mechanisms tend to be inscrutable in proportion to their power.

And, much like what happened to GOTO 40 years ago, language designers have invented less powerful language features that are perfectly acceptable 90% solutions. e.g. nowadays I’d generally pick higher order functions or the strategy pattern over method swizzling because they’re more amenable to static analysis and easier to trace with typical IDE tooling.

Re:Ladybird: Closing this as we are no longer pursuing Swift... by PaulDavisThe1st on Wednesday February 18, 2026 @09:59PM (#47069350)
I don't really want to defend method swizzling (it's grotesque from some entirely reasonable perspectives). However, it does work on external/3rd party code (e.g. audio plugins) even when you don't have control over their source code. I'm not sure you can pull that off with "better" approaches ...
Re:Ladybird: Closing this as we are no longer pursuing Swift... by alwaysbeconsing on Thursday February 19, 2026 @01:32PM (#47077258)
Problem come when a third-party code do that swizzling, looking at you every iOS analytics framework to this day.
Re:Ladybird: Closing this as we are no longer pursuing Swift... by bunderbunder on Thursday February 19, 2026 @02:33PM (#47078079)
That’s the main use case I can think of. It’s possible with other languages but may require more hacking.

I like monkey patching for testing legacy code. I like it less as a thing in production code because it can become a security and reliability problem.