Comments (9)
One per line is insane to read when you get to like 30 keyword arguments. Closing parenthesis is fine on its own line though.
@YingboMa what do you think?
from scimlstyle.
Given that a column width is being enforced, it shouldn’t be hard to see the closing parenthesis if it is on the same line as arguments. There is something to be said for saving vertical space too.
from scimlstyle.
It also (to my eyes), breaks the convention that the indentation can be quickly scanned to see where a function ends. Now one has to actively ignore parentheses that arise at the same indentation level (will editors handle that without issues when one uses code folding?).
from scimlstyle.
Code folding is indeed a bit strange when the closing parenthesis is not indented. You get two folds: One for the args and another for the function body. But maybe that can be solved on the VS Code Julia Extension? julia-vscode/julia-vscode#2907
from scimlstyle.
That doesn’t seem too bad! But there are many different editors people use, and I’d worry a decent number of them may have issues.
from scimlstyle.
One per line is insane to read when you get to like 30 keyword arguments. Closing parenthesis is fine on its own line though.
Yeah, I agree. I made sure JuliaFormatter preserves
function my_large_function(argument1, argument2,
argument3, argument4,
argument5, x, y, z)
...
end
from scimlstyle.
@YingboMa Is it guaranteed to preserve:
function my_large_function(
argument1, argument2,
argument3, argument4,
argument5, x, y, z
)
# code
end
too?
from scimlstyle.
Related Issues (12)
- Better looking badge HOT 1
- Spaces around keyword arguments HOT 3
- Splatting keyword arguments HOT 1
- Line split of function calls. HOT 1
- Use generally agreed on`.JuliaFormatter.toml` with formatting check GitHub action for org packages HOT 2
- Indentation HOT 2
- Change character line length? HOT 2
- SciMLStyle format for short begin end block HOT 1
- Multiline generator/ array comprehension proposal
- Bunched up `import`/`using`s vs new line for each package HOT 1
- How many indents to use for multi-line expressions? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scimlstyle.