Skip to content

Conversation

@bettio
Copy link
Collaborator

@bettio bettio commented Oct 29, 2025

Keep a list of stubbed functions, so we can keep track of functions that may always return the same value.

These changes are made under both the "Apache 2.0" and the "GNU Lesser General
Public License 2.1 or later" license terms (dual license).

SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later

@bettio bettio requested a review from pguyot October 29, 2025 12:59
Stubbed functions serve several purposes in AtomVM:

1. **Compatibility**: Allow BEAM modules that use these functions to work anyway
3. **Environment Differences**: Functions that make no sense in embedded contexts but are required
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happened to #2? For simplicity you can number all of these as “1.” and the correct numbers should be generated automatically when the markdown is parsed.

Copy link
Collaborator

@UncleGrumpy UncleGrumpy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great idea! I have had several social media interactions lately where people were asking for more specific details about differences in AtomVM from BEAM, this should be quite helpful.

There is one small mistake in the numbering of the list of reasons why a stub might be used, but otherwise looks good.

Keep a list of stubbed functions, so we can keep track of functions that
may always return the same value.

Signed-off-by: Davide Bettio <[email protected]>
@bettio bettio force-pushed the stubbed-functions-doc branch from 1c4ebf4 to 0e5c4b0 Compare October 29, 2025 17:15
@bettio bettio merged commit 003afe8 into atomvm:main Oct 29, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants