Code Monkey home page Code Monkey logo

Comments (3)

madmaxoft avatar madmaxoft commented on May 5, 2024

I agree with unix line-endings in the repository; after all, the window git clients can all be set to "checkout crlf, commit lf", which should be the default on everyone's machine.

As for tabs vs spaces, I've always used quite a strict rule, which I believe makes the most sense: indent by tabs, align by spaces, and don't mix both. Since I've authored quite a lot of code in MCServer, it would make sense to continue in this style.
What it means is that when it's a whitespace on the beginning of a line, it is a tab; when it's in the middle of a line, it's a space. The rationale behind is that everyone can set their tab width to whatever they want, and with that they'll adjust the indentation; but it won't break code alignment (sections of similar code aligned vertically, for example see the alignment in https://github.com/mc-server/MCServer/blob/master/source/BlockArea.cpp#L189 ).
For this to work, one needs to drop some bad habits, such as aligning multiline function calls to the parenthesis, and instead use indentation to show the levels (example in https://github.com/mc-server/MCServer/blob/master/source/BlockArea.cpp#L636 )

from cuberite.

bearbin avatar bearbin commented on May 5, 2024

Makes sense to me.

from cuberite.

bearbin avatar bearbin commented on May 5, 2024

I've changed the line endings, does everything seem good?

from cuberite.

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.