jashkenas/coffee-script — Issue #1852: Static typing?
Author: johnnywengluu
Created: 2011-11-10 15:51:07+00:00
State: open

Would it be a good idea to introduce static typing in CS?

Eg.

string greet = (Coder me, number age, string name) -> "Hi. I am a #{coder.getTitle()}. My name is #{name} and I am #{age} years old"

This could solve some issues we have with JS:

- Provide a way for IDEs to autocomplete. So when I type "me." it will give me all the instance methods for Coder. This is impossible atm.
- Good for documentation and clean code.
- No need for manual checking code.
- Less bugs.

Thoughts?