y***@z505.com
2015-09-21 19:04:33 UTC
: > Another way is to drop the operator idea all together ( it is
: > no fun away ).
: > Init( s );
: > Concat( s, mary );
: > Concat( s, sally );
: > Concat( s, sue );
: But, then you could do it in assembler! You don't mean this
: seriously, do you?
Yup. I am serious. I don't think concatenating strings deserves
an operator. I am not at all bothered by a few or even a dozen
lines of procedure calls to build a single string or text and
this type of problem does not occur often enough to warrant
having a language specific operator.
Back in 1995 this string debate was going on, and they still haven't solved it 20 years later...: > no fun away ).
: > Init( s );
: > Concat( s, mary );
: > Concat( s, sally );
: > Concat( s, sue );
: But, then you could do it in assembler! You don't mean this
: seriously, do you?
Yup. I am serious. I don't think concatenating strings deserves
an operator. I am not at all bothered by a few or even a dozen
lines of procedure calls to build a single string or text and
this type of problem does not occur often enough to warrant
having a language specific operator.
Oh wow what an old post I am replying to... It's just extremely interesting that this string problem existed back in 1995, and in 2015 the same problem.
"I am not at all bothered by a few or even a dozen lines of procedure calls"
Haha... this kid must be joking...
SomeProc(Concat('test', other),Concat('somestring', other), Concat(a,b));
Compared to:
SomeProc('test'+other, 'somestring'+other, a+b);
You shortened it from Concatenate to Concat, so why not take it one step further and turn Concat into "+"...
You use "VAR" instead of "VARIABLE"... isn't "VARIABLE" more readable so why not use it instead of VAR? Hypocrisy of the oberon language? Against C terseness but then goes ahead and shortens PLUS to + and VARIABLE to VAR, and CONCATENATE to CONCAT (why not CAT?)
"PROCEDURE" should be "PROC"?
POINTER TO ARRAY OF CHAR is such a silly verbose long form.. compared to:
STRING
When I look at oberon code and see ARRAY 1024 OF CHAR and POINTER TO ARRAY OF CHAR I really wonder if this is becoming COBOL or something worse.
Why not just use PLUS instead of "+" and EQUAL instead of "="
1 PLUS 1 PLUS 1 EQUALS 3
Why use numbers...
ONE PLUS ONE PLUS ONE EQUALS THREE
Isn't that more readable?
CONST should be CONSTANT ... If concerned about readability. So why VAR and CONST shortforms? but not PROC for Procedure? strange
Shortforms like a+b+"test" make code less buggy and easier to read since with Concat()Concat()Concat(Concat()) you end up with a Lisp like brackets everywhere... Nail clippings mixed in with your oat meal.
Math came up with shortforms for a reason. To not become cobol. But even worse, cobol would probably be against POINTER TO SOME THING whereas oberon encourages it all over the place. Isn't there a mathematical symbol for pointer ^
Regards,
Z505 Software
Cobol Sucks
Let's not turn languages into verbose ENGLISH Longforms