AnssiR66 / AlanStdLib

The Standard Library for ALAN Interactive Fiction Language
Other
6 stars 2 forks source link

Changing Library Sources to Natural Casing #129

Closed tajmone closed 3 years ago

tajmone commented 3 years ago

@AnssiR66, I wanted to ask you whether it's OK with you to reformat the whole StdLib source from all-caps to sentence caps, i.e. like:

Add to every thing
  Has desc "".
  Is takeable.

  Verb examine
    Does
      If obj:desc = ""
        Then "You notice nothing unusual about $+1."
        Else say obj:desc.
      End if.
  End verb.

This would make editing the library source much easier since I'm going to change all my editor settings for auto-completions and snippets to natural casing, which is what is expected on most ALAN sources across the various project.

With the upcoming transition to UTF-8 sources for ALAN, I'll be soon working on the dev branch to shift to UTF-8 sources, as well as switching to the new ALAN syntax highlighter (Rouge Ruby) instead of Highlight. So, in the midst of all those updates, it would be a good time to also change the casing in the StdLib sources (well, I could actually start doing that before the rest of the changes).

Another thing: could you enable Discussions from the repository settings? This recently added feature allow to keep long discussions separate from Issues, and keep in the Issues only the technical details of pending development tasks, which makes the whole Dashboard much cleaner.

Thanks!

AnssiR66 commented 3 years ago

Yes, it is ok! I am currently replying through my e-mail, I will go to the repository in the near future and enable the Discussions option.

@AnssiR66https://github.com/AnssiR66, I wanted to ask you whether it's OK with you to reformat the whole StdLib source from all-caps to sentence caps, i.e. like:

Add to every thing Has desc "". Is takeable.

Verb examine Does If obj:desc = "" Then "You notice nothing unusual about $+1." Else say obj:desc. End if. End verb.

This would make editing the library source much easier since I'm going to change all my editor settings for auto-completions and snippets to natural casing, which is what is expected on most ALAN sources across the various project.

With the upcoming transition to UTF-8 sources for ALAN, I'll be soon working on the dev branch to shift to UTF-8 sources, as well as switching to the new ALAN syntax highlighter (Rouge Ruby) instead of Highlight. So, in the midst of all those updates, it would be a good time to also change the casing in the StdLib sources (well, I could actually start doing that before the rest of the changes).

Another thing: could you enable Discussions from the repository settings? This recently added feature allow to keep long discussions separate from Issues, and keep in the Issues only the technical details of pending development tasks, which makes the whole Dashboard much cleaner.

Thanks!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/AnssiR66/AlanStdLib/issues/129, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABO2KHWO6SRWWWXXHFKID43TXJMSLANCNFSM5AF6ZHKQ.

tajmone commented 3 years ago

Change of Heart!

@AnssiR66, after having spent a few hours reformatting the library sources in prose-case, I ultimately realized that the way it is right now is much better and more practical:

  1. With everything in prose case, it's hard to visually distinguish between comments, game strings and ALAN code constructs, even with syntax highlighting on.
  2. Search and replace operations on code become almost impossible, since you'd end up matching strings and comments contents too.
  3. Attributes become harder to spot in code when everything is lower-case.
  4. The library source is quite unlike a normal adventure: there are lot of repetitive constructs that look alike, very long and deep nested conditions, etc. It's not meant for reading like prose.
  5. For some reason, it looked ugly in prose case.

So ... I deleted all the prose-case changes in my local dev branch, and decided it'll be better to carry on like it is now.

Even though my editor's ALAN auto-completions and snippets are in prose case, converting selection to upper case is always easier than the reverse operation, so editing won't be too hard after all.