I’m looking for a language which “knows” itself very well.
Since I don’t know is there such a language or what it is, I use Java here for example.
For example, it can get the “name” defined for a local variable.
String google = "http://google.com";
System.out.println(google.???);
// it prints `google`
Or get the passing parameter names:
void hello(String name) {
System.out.println(name.???);
}
String jeff = "My name is Jeff";
hello(jeff);
// it prints `jeff`, not `My name is Jeff`
Is there any language has such power?
Search for java and introspection. You can get the name and type of properties, methods names and there arguments. Objective-c has similar features.