Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
A feature request thread where someone asked that Informix SQL's {} block comments nest properly, so they'd work around optimizer directives like {+...} and SET statements. Replies noted that block comments in nearly all languages don't nest by definition, and suggested the practical workaround of using "--" line comments for notes and reserving {} for commenting out code. The discussion then drifted into reminiscing about Occam/transputers and SQSL, which do support nestable comments. No change or resolution to the request is recorded.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
I can't think of a single language in which comments nest. It is the
definition of block comments you ignore every character between the
opening symbol and the closing symbol. So in "{ ... }" you therefore
ignore any opening { that might be indicating that you want to nest
these comments.
Although, you are right it would be a nice feature in any language not
just SQL. Everyone has been bit at one time or another by comments not
nesting. I would even except a new symbol that is a nestable comment.
As a work arround I usually use "--" for notes about what I am doing
and then block comments to block out something that I want to skip.
↪ replying to bozon
Paul Watson — — source: Usenet: comp.databases.informix
OCCAM allows for nest comments
bozon wrote:
> I can't think of a single language in which comments nest. It is the
> definition of block comments you ignore every character between the
> opening symbol and the closing symbol. So in "{ ... }" you therefore
> ignore any opening { that might be indicating that you want to nest
> these comments.
>
> Although, you are right it would be a nice feature in any language not
> just SQL. Everyone has been bit at one time or another by comments not
> nesting. I would even except a new symbol that is a nestable comment.
>
> As a work arround I usually use "--" for notes about what I am doing
> and then block comments to block out something that I want to skip.
>
Interesting, but I had never heard of Occam. I suppose you mean this
Occam:
Occam is a parallel processing language designed by a team at INMOS in
conjunction with the design of the transputer processor, and based on
T. Hoare's ideas of CSP.
Occam incorporates support for very fine grained, easy to use threads
and seamless support of multi-processor environments. It can be used
with shared or distributed memory systems, and the strong basis in CSP
makes it excellent choice when formal proofs of correctness are
required.
Very cool language. As an exercise in compiler design we had to write a
language that had nesting of comments but I hadn't seen a language in
the "real" world with this feature.
↪ replying to bozon
Marco Greco — — source: Usenet: comp.databases.informix
bozon wrote:
> Interesting, but I had never heard of Occam. I suppose you mean this
> Occam:
>
> Occam is a parallel processing language designed by a team at INMOS in
> conjunction with the design of the transputer processor, and based on
> T. Hoare's ideas of CSP.
>
> Occam incorporates support for very fine grained, easy to use threads
> and seamless support of multi-processor environments. It can be used
> with shared or distributed memory systems, and the strong basis in CSP
> makes it excellent choice when formal proofs of correctness are
> required.
>
> Very cool language. As an exercise in compiler design we had to write a
> language that had nesting of comments but I hadn't seen a language in
> the "real" world with this feature.
Happy days, I was learning occam in my second uni stint in pisa, 1987, or
thereabout. and BTW
<BRAG>
the expansion facility feature of SQSL (wander to my humble site) uses
nestable comments
</BRAG>
--
Ciao,
Marco
______________________________________________________________________________
Marco Greco /UK /IBM Standard disclaimers apply!
Informix faq http://www.iiug.org/techinfo/faq/informix.htm
4glworks http://www.4glworks.com
Informix on Linux http://www.4glworks.com/ifmxlinux.htm
↪ replying to bozon
Paul Watson — — source: Usenet: comp.databases.informix
Yes, spent a couple of years writing parallel code for Transputers to
analyse data networks back in the dark ages. The performance was
outstanding, went from 10 minutes to analyse 10ms of activity on a
IBM-386 to real time on 7 transputers. Each transputer could do 6 truly
parallel tasks.
bozon wrote:
> Interesting, but I had never heard of Occam. I suppose you mean this
> Occam:
>
> Occam is a parallel processing language designed by a team at INMOS in
> conjunction with the design of the transputer processor, and based on
> T. Hoare's ideas of CSP.
>
> Occam incorporates support for very fine grained, easy to use threads
> and seamless support of multi-processor environments. It can be used
> with shared or distributed memory systems, and the strong basis in CSP
> makes it excellent choice when formal proofs of correctness are
> required.
>
> Very cool language. As an exercise in compiler design we had to write a
> language that had nesting of comments but I hadn't seen a language in
> the "real" world with this feature.
>
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.