Shared vertices vs unique vertices?

I’ve read that shared vertices don’t “shade right” because the normals get smoothed and that when creating meshes procedurally it’s generally bad practice to share vertices.

Is that true? in which case should I use shared vertices?
Currently I’m trying to create procedural geometry based on cubes, so should I use 6*4=24 vertices for a cube instead of 8? Seems kind of wasteful…

You want independent verts in situations where two adjacent faces don’t want their normals smoothed across them.

So basically, if a corner should REALLY be a corner, you want independent verts, so the lighting doesn’t try to smooth out your corner. If you have a corner just because you’re trying to keep the poly count low, and you really just want it to look smooth, then you use shared verts (which means shared normals, which makes things look smoother when lit).

Hope that helps.