rthornton128 / calc

BSD 2-Clause "Simplified" License
65 stars 12 forks source link

un-typed functions not implemented properly #14

Closed rthornton128 closed 10 years ago

rthornton128 commented 10 years ago

Return type not optional in parser; will generate error. It's not possible to have imperative function call as a result

Imperative calls kind of pointless because a function called in this form is essentially a nop (all current language features require a side effect or produce no usable side effects). Since there are no pointers, variables can't be changed in a function call nor are any print-like functions available to actually produce a result.

Possible outcome for fixing bug may be to force functional function prototypes in Calc 2. Would require spec to be changed

rthornton128 commented 10 years ago

Spec corrected to make this clear. Function body may now be empty.