I don't know if the title is descriptive enough, but I came across this PCB and could stop to wonder about its brilliant design. It is an aftermarket trigger controller for an airsoft gun that works linear Hall sensors, such that you may glue tiny neodymium magnets to the different moving parts (not shown in the picture) to detect their position.
Notice the Hall sensor at the very left. It's buried within the PCB! And it even looks like it has some exposed vias to aid with soldering. This way the designers could place the sensor right between the shell and one of the moving gears (removed in the picture). Beautiful!
Is this common practice? And how difficult would it be to use on my own designs? Are there any references or guidelines I could read? This design really impressed me, and gave me many many new ideas for future projects I would like to try out.
UPDATE: As discussed in the comments and in some of the answers, it seems that the cost of manufacturing this PCB will increase because these components must be hand-soldered. I would like to clarify that this is no issue for me. I produce only very low quantity PCB's for prototypes (which I usually solder myself). But still, thank you for bringing this extra cost to my attention. I didn't account for it because of this same reason :)
About the accepted answer: Sadly I can only accept one answer, though I find all of them very useful and insightful. I now know that this type of assembly is not common practice, but can be done if one is willing to pay for the extra cost (or solder oneself by hand). However, I've accepted the answer that gave me the key concept, namely castellated holes, plus the idea of doing the milling right at the edge of the board (just as in the attached screenshot). Thank you all again for helping me out on this, and I'm glad this question lead to a healthy discussion on the pros and cons of z-milling.