Skip to content

Conversation

man-of-eel
Copy link

@man-of-eel man-of-eel commented Aug 4, 2025

@Bottersnike
Copy link

Bottersnike commented Aug 5, 2025

The main motivation for octals, imo, is when doing any interaction with a Linux filesystem, as they use octals for file permissions. Could be worth mentioning in the RFC?

(As a sidenote, you might want to remove Python from the title, both because the word "Python" may turn some people away, and because they're prevalent in plenty of other languages. JS, Ruby and Rust to name a few)

@man-of-eel
Copy link
Author

Python 3 was the first language to introduce the 0o syntax AFAICT and putting it there makes it clear it's not C-style octal literals. And not sure what you mean by turn people away... who exactly?

wrt. Unix file permissions I don't think there's much convincing anyone that this isn't a very niche feature. I was considering just opening a PR to the Luau repo since the actual change is just 3 lines (everything else is added warnings/tests) but since it says to open an RFC for feature additions I thought I should listen. Maybe I'll just make it anyway and see

@aatxe
Copy link
Contributor

aatxe commented Aug 5, 2025

I dunno about turning people away, but I do not think the title of an RFC should ever say "PopularLanguage-style." It feels weird. You're proposing the feature for Luau, it has nothing to do with Python in any way beyond maybe you having been inspired by it in Python. We're not going to accept e.g. the idea that whatever Python changes with this feature in the future, we'll also change in precisely the same way.

This is indeed a language feature addition though, and it does indeed require an RFC. I would just frame it, especially in title, as just the feature you're proposing (Octal integer literals), and discuss any inspiration for the design today in the body of the RFC.

@man-of-eel
Copy link
Author

Thanks, you raise some good points. I agree, this doesn't really have much connection to Python other than the notation originally coming from it. (also it makes it look as if the reason for the RFC is to just add it because Python has it)

Will revise the document, kinda forgot they stay in the repo forever (i think), I wrote it in like 10 minutes it's not organized very well either

@aatxe
Copy link
Contributor

aatxe commented Aug 6, 2025

Yeah, no worries, the actual feature is fine afaik, just need the doc describing it to be more polished since it exists in perpetuity.

@man-of-eel man-of-eel changed the title RFC: Python-style octal literals RFC: Octal integer literals Aug 6, 2025
@aatxe aatxe self-assigned this Aug 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants