Home

ReturnTyp

ReturnTyp is a term used in programming documentation to refer to the type of value that a function or method returns. It indicates the function’s return type in a language-agnostic way, and is often used when explaining or spec-ing interfaces.

In static type systems, ReturnTyp is expressed as a concrete type such as Int or String, or

For functions that yield multiple values, ReturnTyp may correspond to a tuple type or a structured type;

Examples (conceptual): def add(a: Int, b: Int) -> ReturnTyp would specify that the return value has type

See also: Return type, Type annotation, Type inference, Function signature, Tuple type, Union type.

as
a
composite
type
like
a
Tuple
or
an
array.
In
languages
that
require
explicit
type
annotations,
the
ReturnTyp
appears
in
the
function
signature
as
the
declared
return
type;
in
languages
with
type
inference,
it
is
the
type
the
compiler
deduces
for
the
function’s
result.
for
functions
that
may
fail,
it
may
be
a
union
type
or
an
option
or
result
type
describing
success
or
error.
ReturnTyp
thus
captures
the
observable
outcome
of
a
function
call
from
the
caller’s
perspective.
ReturnTyp,
such
as
Int
or
a
tuple
like
(Int,
String)
depending
on
the
function.
In
a
language
with
type
inference,
a
function
definition
without
an
explicit
return
type
allows
the
compiler
to
infer
ReturnTyp
automatically.