I think it is OK to do this. When I was in elementary school, we also learned knitting. Why not programming, too? Some basic skill that could be useful at times.
However, seeing how abysmal general knowledge of mathematics is (in Western countries, don't know about Japan), I wouldn't expect huge numbers of skilled coders to emerge from school because of the inclusion of the subject.
However, seeing how abysmal general knowledge of mathematics is (in Western countries, don't know about Japan), I wouldn't expect huge numbers of skilled coders to emerge from school because of the inclusion of the subject.