Re: First Impressions on Using Alphora's Dataphor

From: Laconic2 <laconic2_at_comcast.net>
Date: Wed, 1 Sep 2004 11:44:36 -0400
Message-ID: <Avqdncc0jeRGcKjcRVn-vQ_at_comcast.com>


"pstnotpd" <schoenmakers_at_tpd.tno.nl> wrote in message news:ch4n8j$d4s$1_at_voyager.news.surf.net...

> > As far as casting goes, I disagree. At least in the dialects of Pascal
> > that I've used, if you cast, you leave fingerprints in the source code.
> Are we talking about the same thing? It has been a while but I with C
> (type)casting I mean instructing the program to view an entity of one
> variable type as a different variable type. It was commonly used in my
> case to read file lines into an input buffer and cast it to different
> structures in one go. How would this fingerprint? Please explain,
> because I've never heard it used as such.

No, we are not. If I understand C correctly, you can use a variable as if it contained whatever type value you like. If you screwed up, well, there's always the debugger.

In Pascal, the cast operator is a "function" that casts a value into another type.
Example:

program cast_example (output);
var a: char;
begin
a := char(65);
writeln (a)
end.

the function char(65) generates no code, when compiled. It merely instructs the compiler to allow the resulting
value to be considered as a value of type char, instead of type integer. If I had said:

program cast_example (output);
var a: char;
begin
a := 65;
writeln (a)
end.

I would have gotten a compiler error, because of the type mismatch between "a" and "65". These compiler errors sound like an obstacle to rapid software development, but they are not. By the time we get to Java, the mainstream is starting to come around to where Pascal was in 1971, I think.

>
> > I learned my first debugger in about 1962.
> Way before my time I'm afraid ;-)
>

There are only two invariants I've noted in the world of computing.

The price per pound of computers tends to remain roughly constant. And the "stone age" ended ten years ago, no matter when the remark is made.

These two seem to remain true across the decades. It's not clear whether price per pound is inflation adjusted or not.

Take my advice: live long and prosper, but don't get old. Received on Wed Sep 01 2004 - 17:44:36 CEST

Original text of this message