by dpedu · 3y ago · 0 comments
- Defining and validating data structures passed in; type doesn't have to be a basic type, it can be complex objects
- Default value
- Input validation criteria
So, with a real world example this is still going to be less verbose than the java equivalents.
You have a type defined, it's just string. There's no default, which means it's a required input. Required inputs obviously can't have a default. Arbitrary strings are a perfectly acceptable input and without seeing how that variable is actually used, I can't speculate about validation criteria and it is very reasonable that for arbitrary strings there are none.
variable "name" {}