Re: IDS Feature Request List (including potential new requests).
Posted in 2006
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.
Topics: General Discussion
It would be nice if {} comments "nested" wrt set{...}, {+ ...}, etc. -- rh
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.
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.
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
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. >