Live data from Hacker News

“The days of using untyped languages on non-trivial projects are over.”

github.com

41–50 of 117 posts

Re: “The days of using untyped languages on non-trivial projects are over.”

#41
The correct title is “TypeScript and the dawn of gradual types”

HN Guidelines: “If the title includes the name of the site, please take it out, because the site name will be displayed after the link.

If the title contains a gratuitous number or number + adjective, we'd appreciate it if you'd crop it. E.g. translate "10 Ways To Do X" to "How To Do X," and "14 Amazing Ys" to "Ys." Exception: when the number is meaningful, e.g. "The 5 Platonic Solids."

Otherwise please use the original title, unless it is misleading or linkbait; don't editorialize.”

Re: “The days of using untyped languages on non-trivial projects are over.”

#43

Typescript propaganda. Instead of worrying about types, why not worry about the actual code quality ? Half of all typescript I've seen uses "any", not to mention the fact that it obsfuscates what's actually running in the browser and forces an unnecessary build step for things that aren't "web apps".

> Instead of worrying about types, why not worry about the actual code quality?

I'd argue that a sign of good code quality is using types even in languages and contexts where you don't have to.

PHP is technically still a duck-typed language, but the community has embraced its relatively new strict typing features with open arms and the PHP ecosystem is all the much better for it.

Re: “The days of using untyped languages on non-trivial projects are over.”

#44

Typescript propaganda. Instead of worrying about types, why not worry about the actual code quality ? Half of all typescript I've seen uses "any", not to mention the fact that it obsfuscates what's actually running in the browser and forces an unnecessary build step for things that aren't "web apps".

The whole point of static types (well one big reason at least) is to improve the actual code quality.

I don't understand how you think it obfuscates what is actually running in the browser.

Nearly all non-trivial web projects have a build step even if they aren't "web apps". But I agree it would be nice to at least have the option to avoid it. There is a JavaScript proposal going through that should fix that.

Re: “The days of using untyped languages on non-trivial projects are over.”

#46

Disappointed to find a puff-piece on typescript. Dishonest headline. Javascript frustrates me just as much as the grumpy old man in the article. That said, I once sat down and asked myself, "self, why was it okay to live through the php years yet you despise javascript for being the same way?" And then it dawned on me, my involvement in php projects forced me to have a low-level understanding of the language that I n…

Much simpler explanation - php and js are both terrible languages.

Re: “The days of using untyped languages on non-trivial projects are over.”

#47

The days of sweeping declarations regarding obviously periodic trends have never arrived. I've been around long enough that "safe" gave way to "productivity" and back to "safe". There's kind of a nascent ethos of being "better" in each new generation that just results in these pendulum effects. The overall effect seems to be enormously positive. I can now bounce between several completely valid build environments, ec…

I think the article argues for "gradual typing" being somewhere in between but being strictly superior to dynamic typing, to the extent that we may never see the pendulum swing back to purely dynamic typing again. (It is my view that obviously static types aren't going anywhere, and that obviously the pendulum will continue to swing back and forth there; I don't think the article contradicts that either.)

Re: “The days of using untyped languages on non-trivial projects are over.”

#48

Typescript propaganda. Instead of worrying about types, why not worry about the actual code quality ? Half of all typescript I've seen uses "any", not to mention the fact that it obsfuscates what's actually running in the browser and forces an unnecessary build step for things that aren't "web apps".

Because it gets exponentially harder to reason about untyped codebases the larger they get. "Code quality" is not good enough, there's no way to enforce that. You can statically enforce types, and use linting rules to discourage usage of constructs like "any".

Re: “The days of using untyped languages on non-trivial projects are over.”

#49
I've been developing all kinds of applications with JavaScript. Some have handled multi-millions of users per day, thousands per second. I started with Netscape 3.0. In all that time there's only been a handful of times that I wish JavaScript was typed and maybe two handfuls of times when the lack of types caused a problem for me or my team.

Re: “The days of using untyped languages on non-trivial projects are over.”

#50
Agree with the sentiment (statically-typed languages are cool), but TS is not ideal. Is the best we have if you want something JS-like, but try to explain the following monstrosity to a junior colleague who's starting with TS in the context of web applications (using one of the most popular frameworks out there, NestJS):

     // a DTO that handles the creation of some kind of resource
      ...
     @IsArray()
     @ArrayMinSize(1)
     @IsString({ each: true })
     @ApiProperty({
       example: ['software', 'maths'],
     })
     tags: string[]
That's real code. Since the TS types gets erased when the code is transpiled to JS, one has to annotate the whole thing just to be sure the clients are not sending us invalid data. And the validation via annotations couldn't be more cumbersome. 90% of the code in the DTO file is annotations. Reminds me Java from 10 years ago.
Post reply on HN