Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] Raw #symbols would not go through EQUS expansion #1605

Open
Rangi42 opened this issue Jan 9, 2025 · 0 comments
Open

[Feature request] Raw #symbols would not go through EQUS expansion #1605

Rangi42 opened this issue Jan 9, 2025 · 0 comments
Labels
enhancement Typically new features; lesser priority than bugs rgbasm This affects RGBASM
Milestone

Comments

@Rangi42
Copy link
Contributor

Rangi42 commented Jan 9, 2025

It's too early to even consider deprecating or removing EQUS expansion (#905) -- we don't yet have user-defined functions or other replacements for EQUS use cases. However, they can still be inconvenient -- you have to do "{foo}" to get the value of your string symbol foo.

ASMotor has a shorter way of doing that, |foo|. However, I wouldn't want to add new syntax, whether as delimiters, a prefix, or a suffix, since we may eventually remove the feature anyway, and since it's not significantly simpler than typing "{ }".

However, we already support the # prefix for raw symbols. That was introduced to allow symbols that share a name with keywords, which is a very niche application (most of the time you can just use non-clashing names).

I'd like to make raw symbols not undergo EQUS expansion. Note that the syntax can be used on any symbol, not just ones that clash with keywords. So you could do do #foo instead of db "{foo}", which saves three characters and is IMO a worthwhile savings to read and to write.

In theory this would break someone's code if they were currently doing something like def #purge equs "rst PurgeMyCache" and then #purge as an instruction macro. But I think it's clear that nobody is doing such a thing. :P

@Rangi42 Rangi42 added enhancement Typically new features; lesser priority than bugs rgbasm This affects RGBASM labels Jan 9, 2025
@Rangi42 Rangi42 added this to the 0.9.1 milestone Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Typically new features; lesser priority than bugs rgbasm This affects RGBASM
Projects
None yet
Development

No branches or pull requests

1 participant