marekburiak / ILI9341_due

Arduino Due and AVR (Uno, Mega, Nano, Pro Mini,...) library for interfacing with ILI9341 SPI TFTs
http://marekburiak.github.io/ILI9341_due
98 stars 36 forks source link

function names #2

Closed shiftleftplusone closed 9 years ago

shiftleftplusone commented 9 years ago

I would suggest to use the same function names as how they are used in common libs, e.g. Adafruit ILI9340 (which works also for ILI9341). https://github.com/adafruit/Adafruit_ILI9340 https://github.com/adafruit/Adafruit-GFX-Library

e.g. I would very much prefer setCursor instead of cursorToXY !!

Instead it's weird if one always has to rewrite all the existing code when switching the display libs.

marekburiak commented 9 years ago

I am sorry but I won't be changing function names at this point. Many people use the library and I don't want them to rewrite their code. Besides, I don't think many people switch between display libraries.

  From: VogonJeltz <notifications@github.com>

To: marekburiak/ILI9341_due ILI9341_due@noreply.github.com Sent: Saturday, September 19, 2015 6:04 PM Subject: [ILI9341_due] function names (#2)

I would suggest to use the same function names as how they are used in commen libs, e.g. Adafruit ILI9340. https://github.com/adafruit/Adafruit_ILI9340 https://github.com/adafruit/Adafruit-GFX-LibraryInstead it's weird if one always has to rewrite all the existing code when switching the display libs.— Reply to this email directly or view it on GitHub.

shiftleftplusone commented 9 years ago

maybe have them as an alias additionally? Adafruit API function names are widly used, too, finally.

marekburiak commented 9 years ago

I think it would just confuse people, have 2 functions with the same functionality. You can always modify my library on your machine and add any aliases you want in ILI9341_due.h somewhere at the end so you can easily copy it if you need to. From: VogonJeltz notifications@github.com To: marekburiak/ILI9341_due ILI9341_due@noreply.github.com Cc: Marek Buriak marek_buriak@yahoo.com Sent: Saturday, September 19, 2015 9:30 PM Subject: Re: [ILI9341_due] function names (#2)

maybe have them as an alias additionally?

— Reply to this email directly or view it on GitHub.

shiftleftplusone commented 9 years ago

no, thanks, that's too much effort if there will be updates - both for you and for me. IMO it's always good to have possibly the same syntax like those which are already established. I saw that you once even changed some calls. e.g. setCursor to cursorToXY. Having both versions (and other ones ) for a limited time parallelly would be a good choice though, and putting the other one into a "will-extinct" lib for a while . It's really hard for new users to apply to your quite unfamiliar API syntax while your current users surely quickly apply to the well-known Adafruit names.

marekburiak commented 9 years ago

The cursorToXY in particular was taken from GLCD library which I have uses as a base for rendering the text. I don't think that my api is "quite unfamiliar", most of the graphic functions like drawCircle use the same names as in adafruit libraries. The text is rendered in a completely different way and I have text functions that adafruit does not have so I can't have 100% same naming scheme.Btw. instead of cursorToXY(..) and print(....) you can just use printAt(...).

  From: VogonJeltz <notifications@github.com>

To: marekburiak/ILI9341_due ILI9341_due@noreply.github.com Cc: Marek Buriak marek_buriak@yahoo.com Sent: Saturday, September 19, 2015 9:53 PM Subject: Re: [ILI9341_due] function names (#2)

no, thanks, that's too much effort if there will be updates - both for you and for me. IMO it's always good to have possibly the same syntax like those which are already established. I saw that you once even changed some calls. e.g. setCursor to cursorToXY. Having both versions (and other ones ) for a limited time parallelly would be a good choice though, and putting the other one into a "will-extinct" lib for a while . It's really hard for new users to apply to your quite unfamiliar API syntax while your current users surely quickly apply to the well-known Adafruit names.

— Reply to this email directly or view it on GitHub.

shiftleftplusone commented 9 years ago

ok, thanks, and of course I respect that it's your lib by your efforts and by your rules :)

BTW, printAt syntax is printAt(x,y, string) ?