-
Notifications
You must be signed in to change notification settings - Fork 161
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
Why does GAP put two spaces after local
and before then
when printing functions?
#473
Comments
The extra semicolon inside the empty while loop also seems a bit strange... Is it intentional? Could we get rid of it? |
Not sure about the spaces, but the ; reflects a No-op statement that is inserted into empty loops as they are parsed to avoid special-casing in the executor. Any really easy way to suppress printing would likely suppress explicit emty statements that actually were in the source. |
I think expressing empty statements that actually were in the source is something we would want to do anyway, as those empty statements shouldn't be there to begin with. |
I wouldn't mind if the two spaces after So, I would write:
I know other people who would prefer to put the whole if statement in one line if it is short enough. |
It does matter in so far as that new users and developers use the output of Of course we could easily argue about how many spaces to use for indentation, and of course people have done so many, many times on countless occasions in the past decades -- I'd guess every minute, somewhere on this globe, somebody is arguing about that ;-). Personally, I long ago learned to be flexible and adjust to the project at hand, and to adopt its formatting conventions, if there are any. With GAP, there are none, not even recommendations, and that can be quite unfortunate, as soon as people mix different styles in a single function. I am less concerned if two separate functions use different styles, as long as they are readable -- so I guess in that regard, we agree :-). Still, I was (and am) wondering about he double-spaces before So, I am quite curious as to why those double spaces where put there. Is it just an accident, or on purpose? And if nobody has a good reason, and nobody minds, I'd still like to remove them :-). |
+1 for removing extra spaces |
I never would have thought to write two spaces anywhere else but as indentation. If I do, it is by accident. :-) |
In particular, don't print 'if x then', but rather 'if x then' (note the extra space in the former), and similar after "local", and before "do". Resolves gap-system#473
In particular, don't print 'if x then', but rather 'if x then' (note the extra space in the former), and similar after "local", and before "do". Resolves gap-system#473
In particular, don't print 'if x then', but rather 'if x then' (note the extra space in the former), and similar after "local", and before "do". This resolves gap-system#473 Also, use consistent padding while printing IsBound statements, update test files and add new test for printing IsBound calls
In particular, don't print 'if x then', but rather 'if x then' (note the extra space in the former), and similar after "local", and before "do". This resolves gap-system#473 Also, use consistent padding while printing IsBound statements, update test files and add new test for printing IsBound calls, as implemented by @alex-konovalov
In particular, don't print 'if x then', but rather 'if x then' (note the extra space in the former), and similar after "local", and before "do". This resolves #473 Also, use consistent padding while printing IsBound statements, update test files and add new test for printing IsBound calls, as implemented by @alex-konovalov
Consider this example:
Note the extra (second) space after
local
, and beforedo
andthen
-- why are they there? Could we perhaps remove them?The text was updated successfully, but these errors were encountered: