RE: SDL-News: time conversion


Subject: RE: SDL-News: time conversion
From: Barker, Presley (Presley.Barker#coreexpress.net)
Date: Mon Dec 18 2000 - 14:14:20 GMT


Well, you sure wouldn't want to allow doing something dangerous like adding
a time to a time, now would you? Strong typing is for weak minds.

P. Barker

-----Original Message-----
From: Rick Reed TSE [mailto:rickreed#tseng.co.uk]
Sent: Saturday, December 16, 2000 4:47 AM
To: sdlnews#sdl-forum.org; meeting
Subject: Re: SDL-news: time conversion

Become an SDL Forum Society member
<http://www.sdl-forum.org/Society/members.htm>
The originator of this message is responsible for its content.
-----From Rick Reed TSE <rickreed#tseng.co.uk> to sdlnews -----

Thomas Weigert at thomas.weigert#motorola.com wrote on 16/12/2000 02:51:

> We could, of course, also wonder why it has to be that time and duration
> have their special data types (in particular, as these are not very
> sophisticated types---no date fields, etc.). One could use reals for
setting
> timers etc. just as well?
>
> Is there any good reason for not using reals to set SDL timers?

Yes, there is.

Because Time is a separate type, any value that is used to set a TIMER must
be a Time value. The general principle of strong type checking applies. The
operations on the Time type are limited, so that it is not possible to (for
example) add a Time to a Time or multiply a Time by a Time. Like any strong
type checking, this rejects some coding errors and therefore helps to assure
quality.

In any case, absolute Time values are not usually very useful, unless
expressed in terms of NOW + d, where d is a Duration value.

--
Rick Reed - rickreed#tseng.co.uk
Tel:+44 1455 55 96 55 Fax:+44 1455 55 96 58 Mob.:+44 7970 50 96 50

--End text from Rick Reed TSE <rickreed#tseng.co.uk> to sdlnews --- For extra SDL Forum Society benefits join at <http://www.sdl-forum.org/Society/members.htm> or (iff this does not answer your question) email: owner-sdlnews#sdl-forum.org

RE: SDL-News: time conversion

Well, you sure wouldn't want to allow doing something dangerous like adding
a time to a time, now would you?  Strong typing is for weak minds.

P. Barker

-----Original Message-----
From: Rick Reed TSE [mailto:rickreed#tseng.co.uk]
Sent: Saturday, December 16, 2000 4:47 AM
To: sdlnews#sdl-forum.org; meeting
Subject: Re: SDL-News: time conversion


Become an SDL Forum Society member <http://www.sdl-forum.org/Society/members.htm>
The originator of this message is responsible for its content.
-----From Rick Reed TSE <rickreed#tseng.co.uk> to sdlnews  -----

Thomas Weigert at thomas.weigert#motorola.com  wrote on 16/12/2000 02:51:

> We could, of course, also wonder why it has to be that time and duration
> have their special data types (in particular, as these are not very
> sophisticated types---no date fields, etc.). One could use reals for setting
> timers etc. just as well?
>
> Is there any good reason for not using reals to set SDL timers?

Yes, there is.

Because Time is a separate type, any value that is used to set a TIMER must
be a Time value. The general principle of strong type checking applies. The
operations on the Time type are limited, so that it is not possible to (for
example) add a Time to a Time or multiply a Time by a Time. Like any strong
type checking, this rejects some coding errors and therefore helps to assure
quality.

In any case, absolute Time values are not usually very useful, unless
expressed in terms of NOW + d, where d is a Duration value.

--
Rick Reed - rickreed#tseng.co.uk
Tel:+44 1455 55 96 55 Fax:+44 1455 55 96 58 Mob.:+44 7970 50 96 50



--End text from Rick Reed TSE <rickreed#tseng.co.uk> to sdlnews ---
For extra SDL Forum Society benefits join at <http://www.sdl-forum.org/Society/members.htm>
For help, email "majordomo#sdl-forum.org" with the body of your email as:
    help
or (iff this does not answer your question) email: owner-sdlnews#sdl-forum.org

--End text from "Barker, Presley" to sdlnews --- For extra SDL Forum Society benefits join at



This archive was generated by hypermail 2a23 : Thu May 09 2013 - 16:05:49 GMT