buzz only allows the first argument of a function to be unnamed. I stand by that choice but sometimes, named argument can be a little repetitive if the value passed has the same name.
With this, we would go from:
fun hello(str firstname, str lastname, int age) > void {
| ...
}
hello(firstname, lastname: lastname, age: calculatedAge);
to:
fun hello(str firstname, str lastname, int age) > void {
| ...
}
hello(firstname, lastname, age: calculatedAge);
We can do the same for object initialization (like rust):
object Person {
str firstname,
str lastname,
int age,
}
var person = Person{
firstname,
lastname,
age = calculatedAge
}
buzz only allows the first argument of a function to be unnamed. I stand by that choice but sometimes, named argument can be a little repetitive if the value passed has the same name.
With this, we would go from:
to:
We can do the same for object initialization (like rust):