Questions tagged [anonymous]

DO NOT USE! Please use a more specific tag such as [anonymous-function] or [anonymous-class].

The term anonymous has come to represent different aspects of development with the rise of the functional programming style and the use of anonymous on-demand applications.

In an effort to disambiguate this tag, it has been split into the following subcategories:

Category Description
Anonymous Classes An anonymous class is a local class without a name. An anonymous class is defined and instantiated in a single succinct expression using the new operator.
Anonymous Functions Anonymous functions use a block of code as a value, defining it as an inline function without a name.
Anonymous Methods An anonymous method is a procedure or function that does not have a name associated with it.
Anonymous Types Anonymous types are data types which dynamically add a set of properties into a single object without having to first explicitly define a type
Anonymous Users Anonymous users are individuals or systems that make use of a product or service, without formally registering account details and are instead associated with some token or identifier.

Former Tag Definition

For new questions, see [anonymous-class] and [anonymous-function].

Typically, a programming language construct like a function or class has a name associated with it -- a symbol that can be used to refer to the construct in some context. An anonymous function or class is one that, in contrast to normal practice, has no name. For example, in Java, you can create an anonymous class using a special syntax that defines a class and constructs an instance of it at the same time:

Runnable r = new Runnable() {
    public void run() {
        System.out.println("Running");
    }
};

The variable r holds a reference to an instance of a class which has no name in Java, but which implements the Runnable interface and can be used anywhere a Runnable instance is needed.

702 questions
3
votes
2 answers

Invoking anonymous closure

Edit ok, great feedback here, got me pointed in the right direction. Use case for invoking anonymous closure is in Scalatra routing layer. I have a bunch of routes that are grouped together under various types, in this example, requests common to…
virtualeyes
  • 11,147
  • 6
  • 56
  • 91
3
votes
2 answers

Ways to protect the global scope in Javascript

ORIGINAL QUESTION: i am studying js and i would like to know if there is any (useful) difference between these two ways of protecting the global scope other than the fact that the second one can be reused (called again). option1: var question =…
svdsvd
  • 37
  • 7
3
votes
1 answer

{DCC Warning} W1036 Variable '$frame' might not have been initialized?

Any ideas why I get this warning in Delphi XE: [DCC Warning] Form1.pas(250): W1036 Variable '$frame' might not have been initialized procedure TForm1.Action1Execute(Sender: TObject); var Thread: TThread; begin ... Thread :=…
Gad D Lord
  • 6,620
  • 12
  • 60
  • 106
3
votes
1 answer

Undefined function error for javascript function

Here is my code, I don't understand what's wrong.