Hello.
I was reading about perl6 on wikipedia for amusement today and I came
upon
the “yadda yadda yadda” operator:
if is_true() {
for @array {
…
}
}
The three dots above (…) are syntactically valid in Perl 6 and are
called
the “yadda-yadda operator”. “…” can be used as a placeholder for code
to
be inserted later. If a running program attempts to execute “…”,
however, an exception http://en.wikipedia.org/wiki/Exception_handling
is
thrown. This operator is useful for abstract
methodshttp://en.wikipedia.org/wiki/Abstract_method,
or for marking places where the programmer intends to insert code later.
This seemed so useful that I thought implementing it for Ruby and
submitting
a patch, but then caught myself and wrote:
class Kernel
def yadda
raise "Yadda operator reached"
end
end
How elegant Ruby is.
Does anyone else think that this is Standard Library material in the
making?