Re: was: Current Uses for Fortran ??
From: James Giles (jamesgiles_at_worldnet.att.net)
Date: 09/23/04
- Next message: James Giles: "Re: read(5,*) problem?"
- Previous message: Rich Townsend: "Re: Dynamic array size reallocation"
- In reply to: glen herrmannsfeldt: "Re: was: Current Uses for Fortran ??"
- Next in thread: Eugene Miya: "Re: was: Current Uses for Fortran ??"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 23 Sep 2004 20:36:30 GMT
glen herrmannsfeldt wrote:
> Eugene Miya wrote:
...
>> I would not say strange as I learned math in the era transitioning
>> to the cross for multiply, the dot, the *, and adjacency. It's trying
>> to be succinct.
>
> Strange because no other programming languages do it. You need at least
> space between two identifiers.
Madcap had a rule that all identifiers must begin with a capital
letter and be followed (if longer than one character) lower-case
letters. Given that rule, adjacency (even without a space) is not
ambiguous as multiply.
> > A number of languages use + for string cat.
>
> Including languages that allow automatic conversion between
> numbers and strings. Consider the Java statement:
>
> println("the sum of three and for is"+3+4);
Does Java associate from the left? Or does it have two
different precedences for +? If the latter: bletch!! Assuming
that + associates from the right, consider the following:
println(3+4+"is the sum of three and four?");
Wouldn't that result in the output of "3 4 is the sum of three and four?"
I don't like + for concatenate since I believe that concatenate
is a perfectly sensible operation on rank-one arrays. Also, I
think that it's a useful idea to permit strings of things other
than characters, and it would be perfectly sensible to allow
elemental addition of strings to scalars, or even arrays or
other strings of the same length. If you use + to mean concatenate,
then what does A+B mean? If they're conformable, and they're
rank-one, it would have to mean both element-wise addition
*and* concatenate.
-- J. Giles "I conclude that there are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies and the other way is to make it so complicated that there are no obvious deficiencies." -- C. A. R. Hoare
- Next message: James Giles: "Re: read(5,*) problem?"
- Previous message: Rich Townsend: "Re: Dynamic array size reallocation"
- In reply to: glen herrmannsfeldt: "Re: was: Current Uses for Fortran ??"
- Next in thread: Eugene Miya: "Re: was: Current Uses for Fortran ??"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|