3 ms·
Now when you establish full functional languages, most languages will allow you to do fullName = map list \(firstName, lastName) -> firstName + " " + first
by tossandthrow 2y ago
Now when you establish full functional languages, most languages will allow you to do
fullName = map list \(firstName, lastName) -> firstName + " " + firstName
and type it as `funfullName: (String, String)[] -> String`.
I have worked on large scale systems in both types and untyped languages and I cannot emphasize strongly enough how important types are.
- noduerme 2y agoThe only thing with anonymous functions is, when the boss says "please include every user's middle initial", you need to go find every instance of an inline function that resembles this. Consolidating that function in a getter in a class object called Person or User or Customer is a lot nicer.
- tossandthrow 2y agoThis is more a question about architecture. But one thing is certain: When you have that one function that is used 165 times throughout the code base, having a type checker is certainly going to help you when you add in the users middle initial.
- nottorp 2y ago> This is more a question about architecture. In an ideal world :) In the real world the customer doesn't know what they want and you can't fully guess what they want or need ahead of time no matter how many diagrams you draw. Incidentally, one of the few good things that came out of the "agile" religion.
- tossandthrow 2y agoYou are completely right! And the exact point I tried to communicate. When you decide to have loose architectural structures, you might allow just writing these types of functions adhoc. The further you go in the project, the more your strengthen the architecture, where needed.