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

Tab support? #31

Open
Siccity opened this issue Aug 19, 2020 · 6 comments
Open

Tab support? #31

Siccity opened this issue Aug 19, 2020 · 6 comments

Comments

@Siccity
Copy link

Siccity commented Aug 19, 2020

I was just weighing the pros and cons of INI or YAML for my upcoming game when I fell aware to SUCC.

I totally dig it!

Just one question; with all these variable options for indentation, how about tabs? Is it supported?

@Siccity Siccity changed the title Tab support Tab support? Aug 19, 2020
@JimmyCushnie
Copy link
Owner

JimmyCushnie commented Aug 28, 2020

Hi! Thanks for your interest in SUCC, I hope it is useful to you. And I'm sorry I took so long to get back to you.

Tabs are not allowed in SUCC, and indeed it will throw an error if it tries to read a file with tab characters in it. The reason for this is that supporting tabs would make the code more complicated, and I personally hate tabs anyway. In my opinion and experience, spaces are always the better choice.

If you want to use SUCC with tabs, it shouldn't be too difficult to fork the project and add support for it yourself. If you manage to add support in a comprehensive and elegant way, I would probably accept a PR for it.

@Siccity Siccity closed this as completed Aug 30, 2020
@JimmyCushnie
Copy link
Owner

I have changed my mind and decided that SUCC should have native support for tabs in files

@JimmyCushnie JimmyCushnie reopened this Sep 28, 2021
@Siccity
Copy link
Author

Siccity commented Sep 28, 2021

A bit too late for me to swap serialization method now. But just out of curiosity, what made you change your mind?

@JimmyCushnie
Copy link
Owner

Since my original decision, I've read a lot of literature on the spaces vs tabs debate. Spaces are still the One True Spacing Character for me, but I now much better understand the arguments in favor of using tabs, and I see the "tab perspective" as more legitimate and reasonable than I used to.

The point of SUCC is that it should be easy and pleasant to work with. For tab people, using spaces for spacing is neither easy nor pleasant. While I'm mostly making SUCC for my own projects, I do hope that others can benefit from it as well.

My turn to have a question out of curiosity -- what did you end up choosing for your data serialization library/language?

@Siccity
Copy link
Author

Siccity commented Sep 28, 2021

Well I originally intended for the data to be editable by anyone, even non-coders. That ruled out space indentation as they might be editing in something like notepad that doesn't convert tabs to spaces, and the difference is not very obvious to everyone. I then realized INI wasn't flexible enough for my needs, and YAML is not as easy to find a parser for as I had hoped. In the end I picked JSON because of its flexibility and wide support. This is to the detriment of those who wish to edit manually, but at least it'll be easy for programmers.

@JimmyCushnie
Copy link
Owner

Makes sense! Thanks for sharing your thought process.

I originally intended for the data to be editable by anyone, even non-coders. That ruled out space indentation as they might be editing in something like notepad that doesn't convert tabs to spaces, and the difference is not very obvious to everyone.

This is another reason I want to support tabs in SUCC.

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

No branches or pull requests

2 participants