That doesn't work for languages which require all the code at once just for compiling, like C++ (if any of the code involves templates), template Haskell, or Rust (at least, not without heroic efforts).
You could make sure the LGPL code only works through a C-API like interface, then you can sub-divide it off more easily, but that can be quite a bit of work.
Try doing that in Rust, C++ or Go. It's not only incredibly annoying, it's also often technically unfeasible due to macros/codegen/templates/generics, so you end up with ugly stuff like linking exceptions clauses and stuff that - guess what? often boil down to a worst version of the MPLv2
I am always amazed how many myths were created around FOSS licensing.