Abdellazizhammami / arduino

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

Stream parseInt & parseFloat "skipChar" protected, until final API decided #698

Closed GoogleCodeExporter closed 8 years ago

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

Make the Stream parse "skipChar" functions protected.

Why?

With so many proposals for later extending the API with options for different 
parsing, allowing public access to "skipChar" will greatly limit future 
options, without breaking the API.  By making skipChar protected, at least 
until the future API is decided, new options can be added later without 
breaking skipChar.

From Michael Margolis (Sept 9, 2011):

"I agree.  The skipChar usage is much less common so hiding it in the initial 
release should not be a big problem if that gives us more flexibility for 
future enhancments."

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

Very few, if any sketches are likely to be using parseInt(skipChar) or 
parseFloat(skipChar), since these functions have not yet been published in any 
officially released Arduino.

By protecting skipChar before 1.0 release, any future API changes will only 
need to preserve the no-inputs case for API compatibility.

Original issue reported on code.google.com by paul.sto...@gmail.com on 27 Oct 2011 at 8:04

GoogleCodeExporter commented 8 years ago
Here is a patch.

Original comment by paul.sto...@gmail.com on 27 Oct 2011 at 8:05

Attachments:

GoogleCodeExporter commented 8 years ago
https://github.com/arduino/Arduino/commit/10001866e612a3929e4e929108b27f4c6ec137
90

Original comment by dmel...@gmail.com on 29 Oct 2011 at 9:43