Why imperative code is worse than functional code

Logic gates:

  • students can be introduced to the idea of encoding whether something is true or false using a simple switch and light (or LED).

  • then students can be introduced to those “tried and tested” basic combinations of switches: AND, OR, NOT.

  • at the point when the complexity of wiring diagrams and physical components everywhere has students frustrated…introduce the basics of Boolean algebra!

But I am definitely not an educator: I will defer to their opinion on an approach like this.