jung6717 / arduino

Automatically exported from code.google.com/p/arduino
0 stars 0 forks source link

Rename LiquidCrystal library to LCD? #250

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What change would like to see?

Rename the LiquidCrystal library to LCD.

Why?

It's clearer and shorter.

Would this cause any incompatibilities with previous versions?  If so, how
can these be mitigated?

Yep, you'd have to rename it in a lot of code.

Original issue reported on code.google.com by dmel...@gmail.com on 6 May 2010 at 6:53

GoogleCodeExporter commented 9 years ago
Maybe name it CharacterLCD?  Since it only works with character LCDs and not 
the graphical ones.

Original comment by estrange...@gmail.com on 11 May 2010 at 4:56

GoogleCodeExporter commented 9 years ago
3 things:
My first reaction was 'I like it.'

My second reaction a couple of hours later was that this would be a great 
opportunity to completely drop support for the 8 data pin versions of the 
constructor; they have rarely been used, have few to no advantages. I 
eliminated internal use of 8 data pin modes in the most recent version of 
enhanced LiquidCrystal with a saving of about 700 bytes of flash and a handful 
of bytes of RAM. This change affects the same line of code in the sketch. A 
good juncture to eliminate the last vestiges of 8 data pins.

The third and most important reaction, however, is that it breaks longstanding 
language conventions. The convention that symbols all in capital letters are 
macros goes back 40 years. The convention that the name of a class starts with 
a capital and then is lower case probably goes back almost 30 years. I'm sure 
that was a factor in choosing 'LiquidCrystal'. Frankly, I don't like 'Lcd 
lcd(rs,rw,en,d0,d1,d2,d3);' very much. I like 'LCD lcd (rs,rw,en,d0,d1,d2,d3);' 
better. But I have not really used the language all that long. I think this 
will seem like a major faux pas to many old C and C++ veterans. This issue 
might be worth discussion on the syntax forum where those people hang out.

Original comment by johnrain...@gmail.com on 15 Jun 2010 at 10:07

GoogleCodeExporter commented 9 years ago
Case where an acronym introduces issues with the perfect camel-case are pretty 
well known, though.  Think of SQLException in Java. Or any class that works 
with BCD data.

Original comment by clvrm...@gmail.com on 15 Jun 2010 at 12:37

GoogleCodeExporter commented 9 years ago
I like LCD better than LiquidCrystal, it is much more intuitive.  However I 
agree that CharacterLCD is the best name since it is by nature a different 
interface from that of a graphical LCD.

Original comment by sky...@gmail.com on 16 Jun 2010 at 12:11

GoogleCodeExporter commented 9 years ago
Like choosing a movie when renting, if you can get two people to agree, it's a 
done deal.

Original comment by clvrm...@gmail.com on 16 Jun 2010 at 1:16

GoogleCodeExporter commented 9 years ago
LiquidCrystal probably wouldn't have been my choice (it was brought over from 
Wiring), but it doesn't seem important enough to change (and break existing 
code).  After all, you're likely to only use it twice: once in the #include 
statement and once when defining an instance.  You can always name the instance 
"lcd".  

Original comment by dmel...@gmail.com on 26 Mar 2011 at 5:53