Is it ok to lie to your child . . . .

Is it ok to lie to your child if the lie is, “I will always keep you safe,” knowing that as your child gets older, you won’t be able to, but somehow believing that by sheer force of will you will, even when you are 80 years old?  Does reality, science and logic really have to be considered?