cs50 / style50

https://cs50.readthedocs.io/style50/
GNU General Public License v3.0
61 stars 31 forks source link

shouldnt punish space after function #101

Closed goyalyashpal closed 2 years ago

goyalyashpal commented 2 years ago

Summary

style50 shouldnt punish the space used between function and the bracket for arguments

Details:

Further Screenshots:

Environment:


duplicate 🔍 : space after function

dmalan commented 2 years ago

Most style guides do not prescribe a space between a function's name and opening parentheses, I'm afraid, CS50's among them!

goyalyashpal commented 2 years ago

do not prescribe a space between a function's name and opening parentheses

for functions other than if, for, while ; right?

goyalyashpal commented 2 years ago

update: i agree it's better to not have space b/w function name & opening parenthesis. there're some whitespace-sensitive languages like julia which do not allow this kind of space and treat it as syntax error.

syntax: space before "(" not allowed in "println (" at ...

and so, i have just settled on space inside the parenthesis for my own style. so: function( "string", argument2 )