Typed variables in an untyped world

2 thoughts on “Typed variables in an untyped world”

  1. I think one of the key benefits of Groovy is doing away with method signatures like you describe and passing around maps that containing named parameters. Just my two cents worth. No more remembering which parameter comes first.

    1. We started doing not quite that but just untyped arguments for a while but when our test framework grew to more than 10 classes or so used by 20 people, figuring out what to pass to who was way harder than standard java and having to put variables in order. I could see how the map could let you do more with optional arguments but it is even less safe than normal Groovy. How do you know what is required and what isn’t? How do you know what types the arguments should be? If you are only one person and its all your code you probably know, but after that its serious wild wild west time.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s