Add syntax sugar for definitions #2

Closed
opened 2018-03-10 23:38:02 -08:00 by DanilaFe · 1 comment
Owner

Old Abacus had the := operator, which allowed the user to create a variable that depended on other variables. This is possible in the new libabacus, however, it is more verbose. In old Abacus:

a = 1
b = 1
c := a+b

In the new abacus, this would be:

a = 1
b = 1
fun c(): num { a+b }

This is more verbose than I'd like. perhaps, add a syntax sugar for generating similar functions?

Old Abacus had the `:=` operator, which allowed the user to create a variable that depended on other variables. This is possible in the new libabacus, however, it is more verbose. In old Abacus: ``` a = 1 b = 1 c := a+b ``` In the new abacus, this would be: ``` a = 1 b = 1 fun c(): num { a+b } ``` This is more verbose than I'd like. perhaps, add a syntax sugar for generating similar functions?
DanilaFe added the
enhancement
label 2018-03-10 23:42:15 -08:00
Author
Owner

There is now sugar for this:

let c: num be a+b
There is now sugar for this: ``` let c: num be a+b ```
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Experiments/libabacus#2
No description provided.