Skip to content
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

Single space inserted after function names #30

Closed
joakim-noah opened this issue Aug 14, 2014 · 10 comments
Closed

Single space inserted after function names #30

joakim-noah opened this issue Aug 14, 2014 · 10 comments

Comments

@joakim-noah
Copy link

It gets inserted between a function name and the opening parenthesis for its parameters and even for function pointer declarations, please remove it.

@jacob-carlborg
Copy link
Owner

Why, I like to have a space there?

@joakim-noah
Copy link
Author

It's non-standard formatting for D code, as you can see in druntime.

@jacob-carlborg
Copy link
Owner

As you can see in druntime and Phobos, there really is no standard.

@joakim-noah
Copy link
Author

While there are no doubt uses of the space here and there, the vast majority of function declarations, something like 97%+, don't use one. That's fairly standard.

@ciechowoj
Copy link
Contributor

What about adding a command line switch to control that behavior? E.g. --no-space-after-func.

@mihails-strasuns
Copy link
Contributor

That really isn't dstep job. I'd suggest to embrace UNIX way and stick to one formatting style (whatever it is) suggesting anyone who wants a different one to pipe resulting output through dfmt ;)

@jacob-carlborg
Copy link
Owner

Actually, I don't mind changing the format of the output. I've changed my mind and is starting to use the style without the space in my own code.

@ciechowoj
Copy link
Contributor

Well, so I'll assume that there is no point of adding switches to control the formatting to DStep (however we could change the behavior to not to place that space after function name, I prefer that variant more too).

@ciechowoj
Copy link
Contributor

ciechowoj commented May 31, 2016

And there might be problem with pipeing the output to the other program, as DStep doesn't print its output to stdout and what is more it can output multiple files...

@jacob-carlborg
Copy link
Owner

jacob-carlborg commented May 31, 2016

And there might be problem with pipeing the output to the other program, as DStep doesn't print its output to stdout

That can be improved.

what is more it can output multiple files...

You can run dfmt after DStep has written the files 😉

ciechowoj added a commit to ciechowoj/dstep that referenced this issue Aug 2, 2016
Fix jacob-carlborg#30: Single space inserted after function names.
This was referenced Aug 2, 2016
ciechowoj added a commit to ciechowoj/dstep that referenced this issue Aug 6, 2016
Fix jacob-carlborg#30: Single space inserted after function names.
ciechowoj added a commit to ciechowoj/dstep that referenced this issue Aug 8, 2016
Fix jacob-carlborg#30: Single space inserted after function names.
jacob-carlborg added a commit that referenced this issue Aug 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants