Function Signature
2025/12/27
- Type
- Learning Resource
- Format
- Glossary Article
- Version
- General
- Subject Tags
- Created
- Updated
- 2026/02/16
- 2025/12/27
A function's signature is the combination of its name, parameters, and return type. It's what defines how you can call the function and what you can expect from it.
For example, the signature of
func add(a: int, b: int) -> int:
return a + bis (a: int, b: int) -> int. This means that the function takes two integers as arguments and returns an integer.
The name "signature" comes from the idea that the function's name and parameters are unique and identifying.
When discussing a function's signature in conversation, you can sometimes use a format like (int, int) -> int to make it more concise.
Don't stop here. Step-by-step tutorials are fun but they only take you so far.
Try one of our proven study programs to become an independent Gamedev truly capable of realizing the games you’ve always wanted to make.
Get help from peers and pros on GDQuest's Discord server!
20,000 membersJoin ServerThere are multiple ways you can join our effort to create free and open source gamedev resources that are accessible to everyone!
Sponsor this library by learning gamedev with us onGDSchool
Learn MoreImprove and build on assets or suggest edits onGithub
Contributeshare this page and talk about GDQUest onRedditYoutubeTwitter…