News for hackers. Stuff that matters.
Re:Fantastic DSLs and where to find them by reitanqild on Thursday June 29, 2017 @11:28AM (#14664043)
Declaring a parameter as a `f: () -> int` instead of `f` requires that you think about what the signature needs to be. What if you don't know?

(Java programmer here.) Then return a sufficiently "broad" type up to, if necessary, Object.

That said I almost never fall that far back, I'd see that as a sign that I should stop and think.

Oh, and the advantage of a typed languages like Java: you can have extremely good tool support. Netbeans (or IntelliJ or Eclipse) will happily help you to change types if it later turns out you were wrong.

There are no comments on this comment yet.