3 ms·
With a type of String @@ ISO-8859-2 everyone knows what a function expects. And if you depend somewhere on a String being ISO-8859-2 but everyone hands you in S
by _Codemonkeyism 10y ago
With a type of String @@ ISO-8859-2 everyone knows what a function expects. And if you depend somewhere on a String being ISO-8859-2 but everyone hands you in Strings of many encodings, you have hard to debug errors (b/c all main stream languages do not show you where your vars have been created or changed in the flow).
I have a smaller Scala code base to maintain (around 50k lines) and it is a breeze b/c many types are annotated, e.g. Money @@ Netto or String @@ InvoiceNumber. Beside Option this has been the greatest productivity gain vs. Java.