gracelang / language

Design of the Grace language and its libraries
GNU General Public License v2.0
6 stars 1 forks source link

Return statements inside object constructors #188

Open apblack opened 4 years ago

apblack commented 4 years ago

See https://github.com/gracelang/minigrace/issues/325. This is really a language design issue.

apblack commented 1 year ago

Disallowing returns doesn’t actually solve the problem. In evaluating the initial value of a def or var, an exception could be raised, and the handler could return something arbitrary.