It is all a question of definition, I guess. (STON fromString: '2e2') = (STON fromString: '2E+2'). => true (STONJSON fromString: '2e2') = (STONJSON fromString: '2E+2'). => true (NeoNumberParser parse: '2e2') = (NeoNumberParser parse: '2E+2'). => true I believe the 'old school' Smalltalk syntax was limited on purpose, to avoid certain ambiguities maybe related to the IDE/tools. It is an open question whether that assumption is still valid. "Be clean & strict in what you produce, be flexible & liberal in what you accept." is a good motto.
On 29 Mar 2017, at 13:31, Henrik Nergaard <draagren@outlook.com> wrote:
Hi,
Apperently the number parser cannot parse '2E+2' correctly, is this a bug or a feature. ('2E+2' asNumber = '2e2' asNumber)
Is there any reason to why parsing numbers with uppercase exponent letter is not allowed? (see NumberParser >> #exponentLetters)
The parser has a method named #allowPlusSignInExponent sending self >> #allowPlusSign which just returns false. Is there any reason for not allowing the pluss sign / having it as true instead? (I guess it should at least be an ivar so it can be configured?).
Best regards, Henrik