by crayz · 16y ago · 0 comments
Yes, you're right that my mental model of the 'if' construct will be basically the same in any language, but it's fundamentally less work and less error prone for me to translate ruby than some other language into that model, and the same is true going the other direction
include 'rspec'
your_point.disagree do
the_example.in_ruby = "if myvariable"
me.think do
this_thing(the_example.in_ruby).is(:more_readable)
end.because do
that_thing.expresses(the_example.in_ruby.what_its_doing.minimalist_core)
end
me.could do
using "blub" do
self.say "IfConditionIsTrue(myVariable.booleanValueOfNullStatus())"
end
end.implying do
self.last_statement.is(:crazy_talk)
end
end
your_point.agree do
constructs = languages.map do |language|
in language do
me.mental_models.find_by_name("The If Construct")
end
end
constructs.should be_identical
end.with_caveat do
languages.min do |language|
in language do
me.mental_models.find_all
return me.mental_strain
end
end.should == "Ruby"
endend.should be "Ruby"