Skip to main content
41 votes
Accepted

Why don't programming languages or IDEs support attaching descriptive metadata to variables?

Why doesn't it exist? The direct answer here is that this isn't technically impossible, no one has just been sufficiently bothered enough by it to create a field-spanning standard that everyone can ...
Flater's user avatar
  • 54.8k
39 votes

Why don't programming languages or IDEs support attaching descriptive metadata to variables?

TLDR Decomposition makes names shorter. Do not fight symptoms, solve underlying problem instead. Scope is important Naming is the hardest problem, not because long names are not readable, but because ...
Basilevs's user avatar
  • 2,819
28 votes

Why don't programming languages or IDEs support attaching descriptive metadata to variables?

Java and C# at least have this sort of feature. Javadoc is the system for it in the Java context, Documentation comments in C# context. Indeed, that’s how IDEs provide on-hover info at all. Generally ...
Telastyn's user avatar
  • 110k
12 votes

Why don't programming languages or IDEs support attaching descriptive metadata to variables?

It's a good question, and some IDEs do have the functionality you suggest, but virtually all programming languages and IDEs have the simple ability to add comments like so: // The lowest integer ...
Steve's user avatar
  • 10.3k
6 votes

Why don't programming languages or IDEs support attaching descriptive metadata to variables?

As detailed by the previous answers, there are both IDEs and Programming languages do have support for this. Support comes in three general categories: Documentation in the code that must be ...
Chris Schaller's user avatar
5 votes

Why don't programming languages or IDEs support attaching descriptive metadata to variables?

Looks like you're programming in Python, so to start with that as an example: There's absolutely something like this! They're called "docstrings" (short for documentation strings), because ...
Josh Brunton's user avatar
3 votes

Why don't programming languages or IDEs support attaching descriptive metadata to variables?

Some languages such as Java, C#, Python and others already have built-in capabilities for this: respectively, Java's JavaDoc comment format, C#'s documentation comment format, and the various ...
Graham's user avatar
  • 2,044
2 votes

Why don't programming languages or IDEs support attaching descriptive metadata to variables?

They have, by moving to OOP. There’s all kinds of tools for adding meta data to class values from xml markup to attributes and even whether they are properties or not. But it sounds like you are ...
jmoreno's user avatar
  • 11.1k
1 vote

Why is it called Data-Oriented Design?

For a moment I was going to ask what the question actually was, then I remembered it was in title. I agree "data-oriented design" is a pretty obtuse and uppity term. The term seems to ...
Steve's user avatar
  • 10.3k
1 vote

Why don't programming languages or IDEs support attaching descriptive metadata to variables?

To add an example language + environment that does support this: Factor! If you'll forgive my non-default prompt (🦖): 🦖 SYMBOL: lowest-bound 🦖 10 lowest-bound set 🦖 HELP: lowest-bound { $...
Andy Kluger's user avatar
1 vote

Why don't programming languages or IDEs support attaching descriptive metadata to variables?

Been there, done that. In a language called MDL (aka MUDDLE) it was possible to associate any object with any other object, and give the association a name, such as "comment". This means ...
Walter Mitty's user avatar
1 vote

Naming for a layer between controller and domain logic

I feel it would really make sense to separate this logic as a layer between the controller and service, so that the service layer can focus on manipulating objects without regard to who or what ...
Flater's user avatar
  • 54.8k

Only top scored, non community-wiki answers of a minimum length are eligible