ArticleslgStudy

science

Higher order message

Higher order message is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Higher order message rather than just read about it. In short: A higher order message (HOM) in a computer programming language is a form of higher-order programming that allows messages that have other messages as arguments. The concept was introduced at MacHack 2003 by Marcel Weiher and presented in a more complete form in 2005 by Marcel Weiher and Stéphane Ducasse.

Key takeaways

  • Higher order message belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Higher order message to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Higher order message from memory before moving on to harder problems.

Reference excerpt

A higher order message (HOM) in a computer programming language is a form of higher-order programming that allows messages that have other messages as arguments. The concept was introduced at MacHack 2003 by Marcel Weiher and presented in a more complete form in 2005 by Marcel Weiher and Stéphane Ducasse. Loops can be written without naming the collections looped over, higher order messages can be viewed as a form of point-free or tacit programming.

Examples In ordinary Smalltalk code, without using HOM, obtaining a collection of the employees that have a salary of 1000 would be achieved with the following code:

However, using HOM, it can be expressed as follows:

Here, select is a higher order message, and hasSalary: is understood to be called on the select message itself, rather than on its result. The Smalltalk language was not modified to implement this feature. Instead, select returns a message that reifies the select send, which then interprets the hasSalary: message. Another example is the use of future message sends in the Croquet Project:

In this example, the future: message causes the addRotationARoundY: message to be sent to the cube object after 1 second.

Adoption The reference implementation in Objective-C leverages the trait that in Objective-C, objects that don't understand a message sent to them, still get it delivered in a special hook method, called forward:. Higher order messaging was implemented in a number of languages that share this feature including Ruby and Smalltalk. ECMAScript Harmony's Proxies documentation specifically mentions higher order messages as an application for their Catchall Proxies.

Similar concepts in other languages The programming language J distinguishes between verbs and adverbs. Adverbs modify the functioning of verbs. This is similar to higher order messages (the adverbs) modifying the messages that follow (the verbs). In the Croquet example above, the addRotationAroundY:. message is still sent and has its normal meaning, but its delivery is modified by the future:1000 message, it will be sent sometime in the future.

References

Worked examples

Example 1 — a first encounter with Higher order message

Start with the simplest possible case. Write down what Higher order message claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Higher order message before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Higher order message ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Higher order message

In research
Higher order message appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Higher order message in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Higher order message is common in secondary-school and first-year university syllabi. It links to neighbouring topics Programming paradigms, so understanding it makes those chapters shorter.
In everyday life
Look for Higher order message outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Higher order message” →

How to study Higher order message in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Higher order message means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Higher order message out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Higher order message in simple terms?

A higher order message (HOM) in a computer programming language is a form of higher-order programming that allows messages that have other messages as arguments. The concept was introduced at MacHack 2003 by Marcel Weiher and presented in a more complete form in 2005 by Marcel Weiher and Stéphane D…

Why does Higher order message matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Higher order message?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Higher order message.

Tags

  • Programming paradigms

Keep exploring