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

Yeah, but when you have static typing, you can't avoid well-defined interfaces.



Let's pick an example:

    function renderMarkdownToHtml(text)
And with static types:

    function renderMarkdownToHtml(text : String) : String
Well-defined interfaces is mostly not about types.


When you want

    function render(markdown : Markdown) : Html
then you will see the reason for types (and lots of them)


Yep.

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.


does renderMarkdownToHtml return a string or does it return a DOM element?




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

Search: