It is possible if the barcode would carry longer serial numbers for identification, not classification of the certain product. The dream of rfid proponents in the nineties was to push a whole pallet through a gate and get a super quick control of packing list at arrival. That would not be possible with optical scanning without unpacking the whole pallet. In production, under somewhat controlled conditions, Barcode ids for parts are used for decades.
Barcodes on products only have UPC/EAN information, which identifies a product, but not its expiration or batch.
Furthermore, I find that barcodes are a bit more picky w.r.t. how to scan them, while RFID is easier.
Depends of the orientation of the tag and the background interference from other sources (or other tags).