by Wyverald · 10y ago · 0 comments
I'm not in any way anti-math.† Imagine that monads were a part of Scratch (the children's programming environment), and I was trying to explain them to my young daughter. If she couldn't get it should I say to her, "this is only high-school math plus a bit more, come on, don't use the fact that you're 11 as an excuse". The other day somebody pointed out that in Tufts they have shown that children as young as five can think computationally. This is the level I'm talking about. I'm talking about being able to teach programming to people who are normally (for whatever reason) math-phobic.
(† I took three years of 3rd-level math.)
Re: Reflection and metaprogramming. I guess you're suggesting teaching her some variant of Lisp? In the Coder Dojo I brought her too they/we were doing either HTML/CSS/JS or Scratch or Python. And all simple examples. I guess a version of reflection and metaprogramming exist in Python (I don't know off the cuff (I'm a Rubyist) but I presume so).
I had to Google object identity. Is this [http://www.cs.sfu.ca/CourseCentral/354/zaiane/material/notes...] what you mean?
I wasn't talking about Lisp specifically. Many libraries and frameworks written in “mundane” languages like Python and Ruby make use of metaprogramming facilities to great effect. Now, you can't say with a straight face that monoids are scary but metaprogramming is not.
> I had to Google object identity.
In most object-oriented programming languages, every object has a unique identity, which is assigned when the object is constructed, and from then onwards can't be mutated. The uniqueness of these object identities can get in the way when you want to program with compound values, for example, the Java expression `new Point2D(2,3) == new Point2D(2,3)` evaluates to `false`, simply because the objects have different identities.
> Is this [http://www.cs.sfu.ca/CourseCentral/354/zaiane/material/notes...] what you mean?
Yes.