Constants start with an uppercase letter in ruby.
This is a ruby carry over but I did not know about it.
It seems not so common in some other programming languages I know.
Especially for parameter/argument names it seems to me an
unexpected underlying syntactical restriction.
In some typed languages (e.g. c,c++,c# ) I can meaningfully
restrict parameters to be constant.
It also seems not to be mentioned in SP help system explicitly.
Rather the other way:
I came about it while I was trying to develop the following simple
define :mplay do |Melody| Melody.each do |note, pause| play note sleep pause end end godownmoses = [[:d4, 1], [:bb4, 1], [:bb4, 1], [:a4, 1], [:a4, 1], [:bb4, 1], [:bb4, 1], [:g4, 2]] mplay godownmoses
Try it with “melody” and it works.
define :mplay do |melody| melody.each do |Note, Pause| play Note sleep Pause end end
does not work either.