It's been rumoured that Al Snell said:
> However, most programming languages deal with two basic kinds of
> abstraction: objects (which have identity) with methods and attributes, OR
> just a list of procedures, backed up by a library of types along the lines
> of:
> 
>  - Various sizes of signed or unsigned twos complement integers
>  - a few sizes of floating point number
>  - fixed-size arrays of N dimensions of any other type
>  - records (with a list of field names and types)
>  - unions (likewise)

that's true for c & c++,  but ...

> However, there are languages with very different data models - Prolog, for
> example.

but I was thinking of something more mundane, like perl.  In perl,
which is untyped, you have to treat any value as if it were a
string, float, or int, all at the same time.  If the user wants
to multiply by two, and then concatenate it to a string, and then
call it, you have to convert types on the fly.  That means in the VM, 
your basic datatype has to be all three, and a flag value saying 
with of the three is the current 'right' value.   But for java, 
this would be stupid.  So the java vm guy would be 'what's all 
this crud in the VM'? and the perl guy is 'we can't live without 
it, its fundamental'.

#! /usr/bin/perl
sub go2 {
  print "howdy\n";
};
$x = "1xyzzy00";
print "$x\n";
$x *= 2;
print "$x\n";
$x = "go" . $x;
print "$x\n";
&$x;

--linas

_______________________________________________
gnucash-devel mailing list
[EMAIL PROTECTED]
http://www.gnumatic.com/cgi-bin/mailman/listinfo/gnucash-devel

Reply via email to