haxetink / tink_pure

Pure immutable data.
MIT License
10 stars 7 forks source link

Add minimal toString() to tink.pure.List making sure they don't get shown as null if empty #23

Closed grepsuzette closed 2 years ago

grepsuzette commented 2 years ago

tracing pure lists can be confusing when empty (they show as null) To avoid confusion and save time, we propose showing empty lists as ().

I think it will help beginners (especially those who work with coconut, e.g. when tracing a field of a chain of computed that shows null where it's supposed to show empty list, my instinct is to jump at debugging)

remains to see if there is any drawback