Coder Social home page Coder Social logo

Comments (9)

ChrisRackauckas avatar ChrisRackauckas commented on May 30, 2024

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.

isaacsas avatar isaacsas commented on May 30, 2024

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.

isaacsas avatar isaacsas commented on May 30, 2024

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.

cossio avatar cossio commented on May 30, 2024

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.

isaacsas avatar isaacsas commented on May 30, 2024

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.

YingboMa avatar YingboMa commented on May 30, 2024

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.

cossio avatar cossio commented on May 30, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.