starkware-libs / cairo-lang

Apache License 2.0
1.35k stars 266 forks source link

Fix Comment Syntax in Code Update storage.cairo #201

Open 0xminds opened 2 days ago

0xminds commented 2 days ago

Summary:

This pull request addresses a syntax issue with comment formatting in the code. Specifically, it corrects the usage of // for comments, which was originally used in places where # should have been employed, following the conventions of StarkNet (or Cairo) language.

Issue:

The original code used the following comment syntax:

// Valid storage addresses should satisfy address + offset < 2**251 where
// offset < MAX_STORAGE_ITEM_SIZE and address < ADDR_BOUND.

However, in StarkNet and Cairo, comments should be written using #, not // (which is common in languages like JavaScript or Python). This inconsistency may cause confusion for developers working with the codebase, as it deviates from the expected conventions of the language.

Fix:

The comments have been updated to use the correct syntax, as shown below:

# Valid storage addresses should satisfy address + offset < 2**251 where
# offset < MAX_STORAGE_ITEM_SIZE and address < ADDR_BOUND.

Importance:

This change is important because adhering to the correct comment syntax is essential for maintaining consistency within the codebase. It ensures that developers using the StarkNet or Cairo environment can easily read and understand the code without confusion. Proper comment formatting also helps maintain the overall quality and readability of the code, especially in collaborative development environments.

Thank you for reviewing this change! Love StarkNet!

reviewable-StarkWare commented 2 days ago

This change is Reviewable