Hi Steve,
I think that your change would be acceptable only if you do 2 lines
strings like in the example you mentioned... But for people (me included)
using SQL queries that underscore is pretty handy. All those
concatenations would make the code ugly and harder to read.
Would you prefer something like:
query :=
"SELECT _
f1, _
f2, _
f3, _
f4 _
FROM _
table1, _
table2 _
WHERE _
table1.id = table2.id"
or this:
query:=
"SELECT " ||
"f1, " ||
"f2, " ||
"f3, " ||
"f4 " ||
"FROM " ||
"table1, " ||
"table2 " ||
"WHERE " ||
"table1.id = table2.id"
What a mess huh? And I am not sure if the constants are concatenated at
compilation time but my concern is readability more than performance in
this case.
Actually it would be !!GREAT!! if we could write a big multiline string
even w/o the underscore. Something like:
query :=
"SELECT
f1,
f2,
f3,
f4
FROM
table1,
table2
WHERE
table1.id = table2.id"
It would make the code even easier to read.
Ciao,
Federico
Federico Balbi
Division of Computer Science
University of Texas at San Antonio
[EMAIL PROTECTED]
> That is, disallow the following in Unicon programs:
>
> procedure main()
> write("hi _
> there")
> end
>
> Why?
>
> (1) There's an alternative that's cleaner:
>
> procedure main()
> write(" hi " ||
> "there")
> end
>
> (2) It's a syntactic pit when trying to write code that reads Unicon
> expressions - as near as I can tell it's the *only* language feature
> that requires line read-ahead in the tokenizing phase (there is
> still line read ahead in the parsing phase, but that's pervasive and
> unavoidable).
>
> Comments? Not worth worrying about?
>
> --
> Steve Wampler <[EMAIL PROTECTED]>
> National Solar Observatory
>
>
> -------------------------------------------------------
> This SF.NET email is sponsored by:
> SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
> http://www.vasoftware.com
> _______________________________________________
> Unicon-group mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/unicon-group
>
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
Unicon-group mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/unicon-group