Skip to content

make for, while, etc. return Nothing instead of () #28

@StefanKarpinski

Description

@StefanKarpinski

We discussed this once a long time ago and decided that it would be nice to have a Nothing object that prints as nothing. Then when entering code into the repl, one doesn't have to worry about putting an unseemly ; at the end of a for loop to suppress the annoying (). Also it would make some potential errors more sensible: if you try to do anything with the Nothing value it can throw a fairly specific error, whereas () is a perfectly legitimate value for many expressions to produce.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions