gbdev.github.io icon indicating copy to clipboard operation
gbdev.github.io copied to clipboard

Remove suggestion about extensions/syntax-hightlight

Open avivace opened this issue 2 years ago • 5 comments

See discussion in https://github.com/gbdev/gbdev.github.io/issues/35

@ISSOtm opinions?

avivace avatar Jan 07 '22 00:01 avivace

It is rarely the case that highlighters have specific support for Z80, let alone RGBASM.

Then, either there is specific support and it can be overridden (e.g. Sublime or VS Code's language choices), or either element is missing, in which case you should still be getting a fallback, which is still much better than absolutely no highlighting. (Even just dimming comments goes a long way.)

ISSOtm avatar Jan 07 '22 00:01 ISSOtm

It is rarely the case that highlighters have specific support for Z80, let alone RGBASM.

The use case I imagine is "I use the same user account on the same PC to develop software for Game Boy and software for Master System, ZX Spectrum, MSX, or the Mega Drive audio CPU." In my personal case, it is Master System software. If I install a highlighter for the union of instructions recognized by the Game Boy CPU and instructions recognized by the Master System CPU, where .z80 represents "the entire 8080 family (hence '80') using Zilog syntax (hence 'z')", it's less bad than applying x86 or ARM rules.

Then, either there is specific support and it can be overridden

That's why I filed #35, so that if we do end up keeping "don't use a file extension meaning 'Zilog syntax for 8080 family'", the guide can cite instructions on how to override it in Sublime Text, Visual Studio Code, and GtkSourceView-based editors.

pinobatch avatar Jan 07 '22 01:01 pinobatch

The use case I imagine is "I use the same user account on the same PC to develop software for Game Boy and software for Master System, ZX Spectrum, MSX, or the Mega Drive audio CPU."

I understood that, but my argument is that it's largely uncommon, and that it is subject to other constraints such as being viewed on GitHub, which has decent support for .asm but none for .z80.

If I install a highlighter for the union of instructions recognized by the Game Boy CPU and instructions recognized by the Master System CPU, where .z80 represents "the entire 8080 family (hence '80') using Zilog syntax (hence 'z')", it's less bad than applying x86 or ARM rules.

Of course, but that 8080-family highlighter may simply have a higher priority for .asm than x86 or ARM. It was certainly the case for me when I was using Gedit.

That's why I filed #35, so that if we do end up keeping "don't use a file extension meaning 'Zilog syntax for 8080 family'", the guide can cite instructions on how to override it in Sublime Text, Visual Studio Code, and GtkSourceView-based editors.

Listing editor-specific instructions doesn't sound like a good idea to me, as we'd have to maintain all of them and possibly add more. Shouldn't a generic mention be sufficient?

ISSOtm avatar Jan 07 '22 08:01 ISSOtm

Regardless, while I disagree with removing the paragraph, I agree it should at least be reworded.

ISSOtm avatar Jan 07 '22 12:01 ISSOtm

Regardless, while I disagree with removing the paragraph, I agree it should at least be reworded.

I agree the z80 confusion should be clarified, but the paragraph (in the current status) does it badly:

  • It implies syntax-highlighter will get it right when .asm or .s is used, which is actually not really different from how wrong is the z80 syntax
  • It tells you that you should "help" to not spread a false information . This is out of scope and quite confusing (mostly right, but not quite)

This should just be explained in a clearer way, distinguishing the two concepts, avoiding smiles, etc. Let's just ditch the current version and propose something new

avivace avatar Jan 07 '22 12:01 avivace