Re:Foo, Bar, and Baz: Not Having It
by okertanov on Sunday April 22, 2012 @12:02PM
(#3875149)
These placeholder variables are the worst thing to happen to language documentation in the modern era. And so there’ll be none of this on Lingua Pragma. I’ll illustrate (meta-illustrate) the problem by demonstrating classes in ruby.
Example 1
class Dog
def speak
return 'woof'
end
end
class Dachshund < Dog
end
fido = Dachshund.new
fido.speak
=> 'woof'
Example 2
class Foo
def bar
return 123
end
end
class Baz < Foo
end
qux = Baz.new
qux.bar
=> 123
Which example conveys more information? Which is easier to quickly grasp? Which would you rather read?
Example 1
class Dog def speak return 'woof' end end
class Dachshund < Dog end
fido = Dachshund.new fido.speak => 'woof' Example 2
class Foo def bar return 123 end end
class Baz < Foo end
qux = Baz.new qux.bar => 123 Which example conveys more information? Which is easier to quickly grasp? Which would you rather read?