Giter Site home page Giter Site logo

Prefixes in identifiers about styleguides HOT 3 CLOSED

sap avatar sap commented on May 29, 2024
Prefixes in identifiers

from styleguides.

Comments (3)

HrFlorianHoffmann avatar HrFlorianHoffmann commented on May 29, 2024 1

In response to flaiker's original comments, created the Pull Request Be consistent #51. I repeatedly heard this chain of argumentation and think it is a valuable addition.

from styleguides.

 avatar commented on May 29, 2024

I am also not really happy with the recommendation of not using any prefixes anymore... In my own daily work I realized, that I often mix prefixing and non-prefixing, depending on something I still have to find out.

Although methods should be short, due to many reasons, it's not like that in my productive code. If the method is really short I intend to use no prefixes because it simply makes the short code even shorter and therefore better understandable.
If there is some more logic in the code, I like to have importing parameters named with I_, exporting parameters named with E_ and local or global variables named with L or G/M. I don't know really why. Maybe because I am used to that for so many years and it's not easy to adapt to new things...?

The other prefix, that tells the type of a variable, makes me also often feel more comfortable with the code. Yes, you often can describe by the name if it's an internal table or a variable, but sometimes you can't (if there is some description with INFORMATION or DATA for example).
It's the same issue when looping over the returning parameter of a function
LOOP AT order->get_order_items( ) INTO order_item
It kind of makes me understand the command again and again. Even though I know what it does, it takes more time to interpret.

Plus: I just also like to see if the "thing" is an object, a variable, a table or a work area.

from styleguides.

fabianlupa avatar fabianlupa commented on May 29, 2024

Fixed in #51

from styleguides.

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.