Giter VIP home page Giter VIP logo

Comments (2)

knirch avatar knirch commented on July 24, 2024

Why? Keep consistency with your code, not with barbed-wire-decorations. Unless you use positional arguments above 9 often, it would be far more consistent and readable to keep $var and ${var:-default} separate.

A quick glance will at the second character tell me if someone is just using the variable, or that they're doing something special with it.

And it's far too common for people to use ${var} as a magical shield, because "that's what they used!". I've had to explain why ${var} is the same as $var more often than I've had to explain why a parameter expansion has to be quoted.

from beautysh.

KaffeMyers avatar KaffeMyers commented on July 24, 2024

Because it is the design choice made in the team I'm in, as simple as that. We use beautysh otherwise for styling, and it not handeling this in any way makes it lack something as a formatter.

While I can accept what you say as a rather bash savvy individual, I have a hard time speaking for the entire body of developers, so just gonna leave it there. Nothing wrong with your arguments.

I guess the alternative here would be to strip the decorations where they serve no purpose. That would be rather easy to sell. :)

from beautysh.

Related Issues (20)

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.