On Thu, Mar 08, 2012 at 07:40:09PM -0500, Nick Sabalausky wrote:
> "Ary Manzana" <a...@esperanto.org.ar> wrote in message 
> news:jjbg62$2vi3$1...@digitalmars.com...
[...]
> > I just stumbled upon this again in Ruby. I have a time object. I
> > want to know if it's in the past. I wrote:
> >
> > time.past?
> >
> > it worked! :-)
> 
> I don't like to do such things (especially in dynamic languages). I'd
> be concerned about it *seeming* to work, but not exactly as I expect.
> Just seems to be programming by guesswork and assumptions. I don't
> trust it.
[...]

Exactly! What if it just happened to do what you *think* it does that
one time, but actually does something different? Then you'd end up with
nasty subtle bugs everywhere that only show up when you run into
boundary conditions or when you pass in parameters that break your
initial (wrong) assumptions.


T

-- 
Having a smoking section in a restaurant is like having a peeing section
in a swimming pool. -- Edward Burr 

Reply via email to