Live data from Hacker News

Why static languages suffer from complexity

hirrolot.github.io

1–10 of 306 posts

Re: Why static languages suffer from complexity

#6
I didn't see the article touch on the "why" explicitly, but: zig really has the chance to square this circle for low level languages, since there is duck-typed type-inferenced-coercion in places where it makes sense. Completely correct about zig not necessarily being good for higher level stuff, but I think (dynamic) HLLs have been converging on dealing with this using static typechecking, with varying levels of success

Re: Why static languages suffer from complexity

#9
> I cannot imagine a single language without the if operator, but only a few PLs accommodate full-fledged trait bounds, not to mention pattern matching. This is inconsistency . . .

How?

> Sometimes, software engineers find their languages too primitive to express their ideas even in dynamic code. But they do not give up . . .

Is this a failure of the language, or a failure of the engineer?

> If we make our languages fully dynamic, we will win biformity and inconsistency,[^] but will imminently lose the pleasure of compile-time validation and will end up debugging our programs at mid-nights . . . One possible solution I have seen is dependent types. With dependent types, we can parameterise types not only with other types but with values, too.

Types are a productive abstraction/model in programming languages. One of many. Each has its strengths and weaknesses; each is appropriate in some circumstances and not in others. Types are not the solution to all problems, any more than currying or OOP or whatever else is.

Post reply on HN