[#6363] Re: rescue clause affecting IO loop behavior — ts <decoux@...>

>>>>> "D" == David Alan Black <dblack@candle.superlink.net> writes:

17 messages 2000/11/14
[#6367] Re: rescue clause affecting IO loop behavior — David Alan Black <dblack@...> 2000/11/14

Hello again --

[#6582] best way to interleaf arrays? — David Alan Black <dblack@...>

Hello --

15 messages 2000/11/26

[#6646] RE: Array Intersect (&) question — Aleksi Niemel<aleksi.niemela@...>

Ross asked something about widely known and largely ignored language (on

23 messages 2000/11/29
[#6652] RE: Array Intersect (&) question — rpmohn@... (Ross Mohn) 2000/11/29

aleksi.niemela@cinnober.com (Aleksi Niemel) wrote in

[#6723] Re: Array Intersect (&) question — Mathieu Bouchard <matju@...> 2000/12/01

> >Use a hash. Here's code to do both and more. It assumes that

[#6656] printing/accessing arrays and hashes — raja@... (Raja S.)

I'm coming to Ruby with a Python & Common Lisp background.

24 messages 2000/11/30

[ruby-talk:6026] Re: Time.local bug?

From: "Conrad Schneiker/Austin/Contr/IBM" <schneik@...>
Date: 2000-11-03 07:49:25 UTC
List: ruby-talk #6026
Mathieu Bouchard writes:

# > Please tell me this is a bug, not a feature.
# >   t = Time.local(2000,11,31)  # Nov 31, 2000 (nonexistent date)
# >   # t is now Dec 1, 2000 - no errors, no nothing
# > This is v. 1.6.0 on AIX.

IMHO, its a bug.

# This seems normal. Given that the day number is not above 31, there are
# several useful things to do with an invalid date:
# 
# 1. Round down to the last day of the month
# 2. Spill over to next month (feb 31, 2001, becomes mar 3, 2001)
# 3. Treat as 1st of the next month
# 4. Return nil or throw exception

4b) Throw exception.

# Case #2 is how UNIX did it, and it's how POSIX does, and then others 
have
# followed; most practical languages do it like POSIX, and javascript does
# too. =)

What about Java? It's intended use for enterprise applications (among 
other things) makes this a somewhat more interesting case to consider.

But in any case, the relevant question is whether "there's a better way to 
do it" (remember TABWTDI) that is also sufficiently worthwhile.

Back a couple of decades ago when machine cycles and bytes were some 100x+ 
times more expensive, I think it was pretty rare for system calls to check 
the validity of arguments, and when they did, they often did a crude job 
of it. But AFAIK, the general trend since then has been in the opposite 
direction (when feasible or convenient), with the general aim of 
increasing reliability and not letting errors slip by undetected, since 
they may be indicators of larger but as yet undetected problems.

Conrad Schneiker
(This note is unofficial and subject to improvement without notice.)

In This Thread

Prev Next