5 ms·
I work on / have worked on fairly big projects. Plenty of them have been "a challenge to work with". Always because of the code that had been written (+ other t
by chvid 10y ago
I work on / have worked on fairly big projects. Plenty of them have been "a challenge to work with". Always because of the code that had been written (+ other things). Never because of the language.
For me the trick to big projects is strong modularisation and well-defined interfaces which you can do regardless if you have static type checks or not.
- cgag 10y agoYeah, but when you have static typing, you can't avoid well-defined interfaces.
- chvid 10y agoLet's pick an example: function renderMarkdownToHtml(text) And with static types: function renderMarkdownToHtml(text : String) : String Well-defined interfaces is mostly not about types.
- glibgil 10y agoWhen you want function render(markdown : Markdown) : Html then you will see the reason for types (and lots of them)
- chvid 10y agoYep. And there you have it. Two different approaches to buidling software. Which is more productive, which yields higher quality? I have build plenty of software both ways. And my answer is a confident "it depends". But I will tell you this: A fine-grained type hierarchy over either Markdown or HTML opens up a very big can of worms. All this reminds me of SOAP vs. HTTP/JSON: I have seen plenty of SOAP webservices seriously stuffed up regardless of/because of strong typing whereas developers seem to do much better with HTTP/JSON because of the simplicity and directness of the approach.
- deleted 10y ago[deleted]
- chii 10y agodoes renderMarkdownToHtml return a string or does it return a DOM element?
- chvid 10y agoPlus. I think that there is a bit of developer-psychology-101 here. Most developers would rather go: This project sucks. This shitty language has not got a proper type system. Let's build a compiler/type-checker/use-this-cool-alpha-from-bingo-banana-I-found-last-night. Rather than: This project sucks. I cannot believe how much bad, disorganised code we have written. Let's sit down and look at our mess to see if we can improve the way we write code, work together and in general develop way we make software.
- plgs 10y agoI don't see these as mutually exclusive. Introducing a compiler/type-checker can be (depending on your situation) a very concrete way of improving the way code is written.
- chvid 10y agoThey are not. But the pscyhology is that people will much rather talk about introducing a new tool rather than what they have done wrong.