Hacker News new | past | comments | ask | show | jobs | submit login

If you feel a particular value needs an explicit type you can always include the type in the declaration. Or your development environment should be able to tell you what type it is.

I do think scala needs an IDE to be used effectively, at least if you're making heavy use of implicits and inferred types (and, as a sibling mentions, indirect imports). But I think that's ultimately a good thing: it uses the power available to us nowadays to allow a more compact representation of code than would be acceptable in a plain text file (which is good for readability - AIUI evidence is that code readability takes a big hit as soon as a function spans more than one screen). Rather than throwing away the convenience of text like the '80s "visual programming" efforts, it's more of a "progressive enhancement".




Yes, I have started to enforce a policy of explicitly declaring val types, but I would almost prefer it if Scala enforced this instead of me.


Making your IDE add them when it autoformats should be as simple as one checkbox (he blindly asserts).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: