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

Remove the indentation warning. #903

Merged
merged 2 commits into from
Oct 2, 2023
Merged

Remove the indentation warning. #903

merged 2 commits into from
Oct 2, 2023

Conversation

dvander
Copy link
Member

@dvander dvander commented Oct 2, 2023

In the early days of AMX Mod X/SourceMod there weren't really good
source editors. Many people used Notepad for their scripting. Mixing
tabs/spaces and getting indents wrong was very common.

These days there are a few factors that make this less critical:

  • There are many high quality editors available, and there is much
    more awareness around them.
  • The industry has basically settled on spaces for indentation.
  • Modern programming languages tend to come with auto-formatting tools now as
    well, which is probably something SourcePawn should do.

Either way, the inline linter is a huge, huge hack and has no business
being right there in the lexer. It makes token caching very complex.
It's slow. And it requires knowing a predefined value for tabsizes,
which makes no sense.

So awaaaay it goes.

In the early days of AMX Mod X/SourceMod there weren't really good
source editors. Many people used Notepad for their scripting. Mixing
tabs/spaces and getting indents wrong was very common.

These days there are a few factors that make this less critical:
  - There are many high quality editors available, and there is much
    more awareness around them.
 - The industry has basically settled on spaces for indentation.
 - Modern programming languages tend to come with auto-formatting tools now as
   well, which is probably something SourcePawn should do.

Either way, the inline linter is a huge, huge hack and has no business
being right there in the lexer. It makes token caching very complex.
It's slow. And it requires knowing a predefined value for tabsizes,
which makes no sense.

So awaaaay it goes.
@psychonic
Copy link
Member

Purge the unclean.

@dvander dvander merged commit 7dd6cf5 into master Oct 2, 2023
19 checks passed
@dvander dvander deleted the sema2 branch October 2, 2023 04:31
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.

2 participants