This is a very good topic to have here since there is active debate going on in woodworking circles about the overuse of sanding to smooth wood in the modern era.
How do both techniques compare? In terms of result, cost, applicability to different kinds of wood, different shapes of work pieces and cleanliness of process.
Where possible scraping is always preferable. That's a strong statement but it's easily backed up.
Results Using conventional scrapers and when done properly scraping is capable of creating a surface ready for finish, so that's equivalent to roughly 180-240 grit paper. In general the smaller the burr on the scraper the finer the surface it will create.
Using an unconventional scraper, one with a sharp knife edge, you can get to a surface even finer than this, equivalent to 600 grit if not higher. However, this is not needed in almost all cases and can be counter-productive as a wood surface that smooth can resist finish. On very hard, resinous hardwoods though knife-edge scraping can create a superb surface, requiring nothing more than hard buffing to create a shine.
But talking about the smooth surface scrapers create is only the tip of the iceberg, since you can go from sawn lumber directly to a finish-ready surface using just the one tool, rather than working up through the grits as we have to using abrasives - making a card scraper literally the equivalent of sandpaper from 60 grit through to 220.
Cost There is simply no comparison on cost. As I like to put it, a scraper is like an infinite stack of sandpaper, which is a neat trick for something that costs perhaps 10 USD and at best can be free.
The costs associated with sandpaper build and build over time because sandpaper is a consumable resource (and for best results users should be encouraged to use it and discard it more frequently), but card scrapers are lifetime tools. Several lifetimes in fact; if cared for your grandchildren could be using the same card scraper you bought or made for yourself last week.
Applicability to different kinds of wood There's some contention here. Conventional thinking is that you can't scrape softwoods but as Chris Schwarz has written about and as I too found out for myself, you can.
Scraping can achieve good results in pretty much any wood in good condition, most certainly hardwoods. Spalted hardwoods could prose a problem as areas within the spalting can be soft and 'punky' which means they are too soft to scrape successfully.
Cleanliness of process This can be summarised by: shavings, not dust.
Other advantages
Faster Despite being a hand process compared to a powered process, it is actually faster to go from rough wood to finish-ready.
Quieter Obviously there's no comparison between a hand process like scraping and power sanding, which is a key benefit for those woodworking in the home (your family members and neighbours will thank you. Plus no more ear defenders or ear plugs for you.
Never clogs Unlike sandpaper a scraper can't clog. Resinous woods can build up a residue behind the edge, but this is easily scraped or wiped away in a moment.
Works on finish as well as wood With a light touch scrapers are great for smoothing minor imperfections in finish, but are actually amazingly good at removing finish entirely if needed.
Disadvanteges
It couldn't all be upside. Scraping is a hand process, so by definition requires muscle effort. On large projects in particular scraping can be extremely tiring, not just on the arms but on the small muscles in the hand in particular because of the conventional hand grip seen in the above image. This can be offset somewhat by using a commercial scraper plane or holder, or a homemade wooden equivalent:
I wonder if I could substitute sanding with scraping, either entirely or partially.
I am a big proponent of scraping and use it as much as I can to help keep dust from woodworking at a minimum, however it cannot completely take the place of abrasive papers/films/cloths. Sometimes a quick swipe with a piece of 150 paper is all that's needed so there's no reason to religiously scrape in every instance.
Traditional versus heretical scraper sharpening
The traditional way to 'sharpen' a card scraper is summarised as follows: file the edge, hone the edge against a stone to remove file marks, hone both flat faces to remove burr from filing, prepare corners for burr formation by burnishing flat ("drawing the steel"), lastly turning the burr using the burnisher. The process is not particularly long or involved but some users experience difficulty in repeatably achieving good burrs along the whole width of the scraper. The entire process is not needed every time, a burr can be re-turned a few times before the edge must be re-prepped from scratch.
There is a faster modern alternative however: skipping every step but the first one.
After filing there is already a burr along each edge of the scraper, which is of course exactly what the sharpening process seeks to create. They are evidently not as refined as those created by the conventional preparation method, but they are capable and by using finer files the burr can be made smaller and less crude than those created by a medium or bastard mill file.
By using the card scraper directly after filing the preparation process is cut from minutes literally to seconds, taking no more than 10-20 seconds to do. Because of the speed and ease the user is more likely to sharpen as needed, rather than put off sharpening past the point where scraping results are not as good as they could be.
Note: in addition to card scrapers there are cabinet scrapers, which are not exactly the same. Typically the blades are thicker and the edge is prepared differently (with a 45° bevel and one pronounced burr at the apex) and they are almost always used in a scraper plane of some kind.
Homemade or adapted card scrapers
Scrapers traditionally were made from old saw blades that had broken or bent and couldn't be made serviceable again. This is still a viable way of making your own scraper. The blades can be cut down using a motor tool with a cutting disk or slitting disk, or as conventionally by sawing through with a hacksaw (tip: grip the saw plate with scrap wood on both sides to prevent
If you would like to experiment with knife-edged scrapers, boxcutter blades and single-edged razorblades make excellent small scrapers, perfect for board edges, getting into tight corners and for fine surface touch-ups. They're also excellent for smoothing minor imperfections between coats of finish. Rounding or "knocking off" the corners slightly can be advisable to help prevent leaving track marks in the work.
Sharpening these blades is possible, but tricky to do well (very shallow bevel angle) so it may be necessary to use one until it no longer scrapes well and then discard.
For larger surfaces a kitchen knife can be pressed into service, even inexpensive stainless knives have steel that is up to the task. These can be honed or re-sharpened as needed by any conventional means, I use a standard rod-shaped knife steel and steel the edge as soon as scraping efficiency goes down and scrapings are no longer being produced.