-
Notifications
You must be signed in to change notification settings - Fork 17.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/cgo: write C code in a more proper way #12031
Comments
I'm sorry we cannot change the language, including the two forms of comments it accepts, I feel that you can use the C style |
I will second ANY proposal to make included C code unmistakably distinguishable from comments.
|
@pablochacin C is not part of the Go language specification. cgo is implemented entirely as a preprocessor and the go tool on top of the regular go compiler. |
@davecheney Why cannot Cgo pimp go language and add syntaxes. It is a preprocessor. So I don't think there could be a problem. Using the C preprocessor in Go would be great too :
|
Or you could just move the majority of your C code to actual |
@dominikh Does anything happens if there's a comment in a Edit: Do not forget that almost C programmers use block comments |
@dominikh All cgo cares about is what you put in the .go file. You can write |
@ianlancetaylor I assume your last comment was directed at @StEvUgnIn, not me? |
@StEvUgnIn et al, this issue is marked as closed. Please continue the discussion on golang-nuts. Thanks. |
@dominikh Yes, sorry. Error on my part. |
Hello,
Just like C code is written in Go comments, an IDE implementation would bring problem for intellisense. I find the current notation ugly. From today on, I propose to implement old style Pascal comments to use C code with Cgo.
What do you think ? I think it would be another good loan to Pascal.
Source
http://www.freepascal.org/docs-html/ref/refse2.html
http://www.math.uni-leipzig.de/pool/tuts/FreePascal/prog/node3.html
The text was updated successfully, but these errors were encountered: