Build method overloading #7511
emindeniz99
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When we add a new field to our table, we need to update all build method in project. I prefer a method with default value for new field.
for example, our table
Table{
count:int;
name:string;
age:int;
}
the fbs code generator can be able to generate all build methods for 1, 2 and 3 parameters.
Build(int count){
return build(count,0,0);
}
Build(int count, string name){
return build(count,name,0);
}
Build(int count, string name,int age){
return build(count,name,age);
}
So new added fields do not require project code changes. They can use default value.
If it already exist or alternative, sorry i could not found.
What do you think about build overloading?
Beta Was this translation helpful? Give feedback.
All reactions