>programming the money so that it couldn’t be used for sweets
That's stretching the concept 'money' a bit, is it still money if it's non-fungible? What on earth happens if the money is paid to someone? Can you 'launder' the restriction away by swapping money with a friend? Does the restriction remain indefinitely, making it completely non-fungible?
These are good questions to be asking, and they are all theoretical possibilities. Some people see this as an opportunity for improvement, others find it deeply concerning. Central banks do not necessarily need to abide by the old definition of money.
That's stretching the concept 'money' a bit, is it still money if it's non-fungible? What on earth happens if the money is paid to someone? Can you 'launder' the restriction away by swapping money with a friend? Does the restriction remain indefinitely, making it completely non-fungible?