When writing e.g. an axis label for a plot or a header for a table column that contains data that is associated with a unit (e.g. a length in meters), I always used to write it down like this:
length [m]
until someone told me that the proper notation for this would be
length / m
indicating that you have "divided away" the unit for the provided data (which is then unitless). The reason, I was told , why the latter is to be preferred is that the square brackets are usually used as some kind of operator that returns the unit of the quantity it is acting on, e.g.
[length] = m
Now, I am wondering whether this is indeed the general consenus in physics (or if everybody does this to their own preference) and if it is, does this kind of notation have some kind of name that I could refer to when talking about this?