Anonymous Method

What Does Anonymous Method Mean?

An anonymous method is a a function or subroutine that is defined or called without being name-bound to an identifier.

Advertisements

Anonymous methods are used by many modern programming languages such as C#, and PHP.

Anonymous methods are more commonly known as anonymous functions.

Techopedia Explains Anonymous Method

Anonymous methods derive from mathematics that dates back to the 1930s when Alonzo Church invented the lambda-calculus, the inspiration for functional programming which came much later. The first programming language to contain these types of functions was LISP in 1958.

The idea of anonymous methods is that a routine can have functions that exist within code blocks that can operate internally within that block of code and make computations whose purpose is usually to pass arguments to higher order functions, commonly found in languages that have first-class functions.

Anonymous classes are used in other languages such as Java which does not support anonymous methods.

Advertisements

Related Terms

Margaret Rouse
Technology Expert

Margaret is an award-winning technical writer and teacher known for her ability to explain complex technical subjects to a non-technical business audience. Over the past twenty years, her IT definitions have been published by Que in an encyclopedia of technology terms and cited in articles by the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine, and Discovery Magazine. She joined Techopedia in 2011. Margaret's idea of a fun day is helping IT and business professionals learn to speak each other’s highly specialized languages.