yellowstonegames / SquidLib

Useful tools for roguelike, role-playing, strategy, and other grid-based games in Java. Feedback is welcome!
Other
448 stars 46 forks source link

why isn't putString() put() like the rest? #169

Closed SquidPony closed 7 years ago

SquidPony commented 7 years ago

It seems weird. I get that put() has a lot of instances but maybe the answer there is to split out the ones that take an array index int as putIndexed() or something rather than splitting on String vs char

tommyettinger commented 7 years ago

It's a good question, but personally I wonder why they're mostly put() to begin with. A suggestion for auto-complete on put( pops up dozens of similar entries... Anyway, the reason is most likely that SquidPanel, until recently, used a 2D array of Strings instead of a 2D array of chars. This meant put() would put into the String for one cell and putString would put one char each into multiple cells. The names aren't changing in the 3.0.0 series because that would break all the code.

SquidPony commented 7 years ago

They were all put() to start with so that the prime functionality would be very short to enter. In the early early days there were multiple flavors with different names but then it became a matter of finding which version you wanted with which name.

I guess the there might be room for an RFE for 4.0 to have the putFoo() split out better now that there's so many similar methods.