Abstractions

Attributes and foreign declarations

Use public attributes and foreign declarations.

What

Attributes and foreign declarations are explicit annotations on declarations.

Why

They connect Musi declarations to external systems and symbol semantics without hiding behavior in implicit magic.

How

Use @link, @when, @repr, and @layout where external binding or metadata is required.

@link(name := "c") foreign "c" let puts (msg : CString) : Int;
foreign "c" let puts (msg : CString) : Int;

When

Use foreign declarations when you integrate existing runtime boundaries.

Analogy

Like adding attributes in C# or annotations in Java, but in a compact declaration style.

Try it

Review attributes first, then the foreign example, then continue to Quote and syntax values.