unageek / inari

A Rust implementation of interval arithmetic (IEEE 1788)
MIT License
31 stars 2 forks source link

Format intervals with a space after the comma #62

Closed Chris00 closed 2 years ago

Chris00 commented 2 years ago

I was surprised that there was no space after the comma as I think [3.141592e+00, 3.141593e+00] is easier to read than [3.141592e+00,3.141593e+00] so this is to start a discussion on this.

unageek commented 2 years ago

Thank you for the suggestion.

The IEEE 1788 standards are not clear on this point. While I have no plan to change the current formatting, alternative formatting options would be definitely useful.

Chris00 commented 2 years ago

alternative formatting options would be definitely useful.

Do you mean as features to the library?

unageek commented 2 years ago

Yes, I want some declarative API that allows users to format intervals as they want.

unageek commented 2 years ago

This is just my personal preference, but what I like about the current formatting not having space after comma is that it is easily distinguishable from an array literal.

unageek commented 2 years ago

Please reopen when you have any updates.