Next.js, TypeScript are instant turn offs

13 pointsposted 9 months ago
by ilrwbwrkhv

Item id: 41812842

23 Comments

midiguy

9 months ago

Pretty much every issue with Typescript is actually an issue with Javascript. Typescript is purely an improvement.

ineedausername

9 months ago

It looks like "ai generated" is the problem.

fullstackwife

9 months ago

Is this a bigger problem than Microsoft Front Page(or other WYSIWYG) generated code? How would you compare this Upwork contractor quality code?

javcasas

9 months ago

Frontpage code is isolated in a single file, a single page in your website.

AI code is often reused, because it's code and you are supposed to export/import it. Hence the damage spreads instead of being contained.

m0llusk

9 months ago

TypeScript can be great, but in practice I have seen teams lean on it as a way of taming data models that are overly complex and changing at rates that strain the ability of developers to keep up. Sometimes it might more sense to control complexity and extreme rates of change directly instead of moderating their impacts by using TypeScript like a blind person's cane.

purple-leafy

9 months ago

Sounds like AI is the problem, which I agree, LLMs in most peoples hands outputs garbage.

Luckily I’m working in a codebase with “human” issues, which I’m responsible for refactoring

aristofun

9 months ago

TypeScript is the best thing that ever happened to js and to web dev in general to date.

JS infra and tooling is the worst thing that is still happening to web dev.

Both are slowly getting better and better. I see no objective reason to stay narcissistic about it in 2024.

Bad code is a universal problem, not a feature of a specific language.

hu3

9 months ago

Next.js projects I've seen became semi disposable after a year.

2024user

9 months ago

how many new codebases could you have worked with that are AI generated?

CuriouslyC

9 months ago

If typescript is an instant turn off for you, you might not be an engineer.

wryoak

9 months ago

If you write a web language as a primary part of your job, you might not be an engineer.

In all seriousness though, I hate having to add a bunch of tooling to my dev process so that I get to write extra syntax to avoid warnings about valid code in the language as it is actually interpreted by the VM. It’s bureaucratic bs, so yeah, I avoid roles heavy on TS.

JS has a type system already. Its rules are laid out in easy to read specs. Maybe ”engineers” should learn how JS works instead of placing “safety” features in the way of their half baked understanding of the code and how it interacts with external data from the DOM, http requests and so on.

MisterKent

9 months ago

If you write a systems language as a primary part of your job, you might not be an engineer.

In all seriousness though, I hate having to add a bunch of tooling to my dev process so that I get to write extra syntax to avoid warnings about valid code in the language as it is actually interpreted by the CPU. It’s bureaucratic bs, so yeah, I avoid roles heavy on C.

Assembly has a type system already. Its rules are laid out in easy to read specs. Maybe ”engineers” should learn how Assembly works instead of placing “safety” features in the way of their half baked understanding of the code and how it interacts with external data from the terminal, disks and so on.

wryoak

9 months ago

This. I love snow clone slippery slopes.

EduardoBautista

9 months ago

Typescript is about reducing and almost eliminating runtime errors. We rarely have any errors show up on our error monitoring tools because of Typescript.

purple-leafy

9 months ago

TS does not have a VM. So you’re starting off on the wrong foot. And JS does not have a type system at all.

Also, you shouldn’t gatekeep who is/isn’t an engineer.

wryoak

9 months ago

I was referring to JS’s VM since TS outputs JS, but I could be misusing the term in that regard too.

And I’m not gate keeping who is an engineer, I was ironically rebuking the gatekeeping of the comment to which I’d responded.

javcasas

9 months ago

JS has a dynamic type system. You may not like it, that doesn't mean it doesn't have one.

Otherwise, no programming language would have a type system except for Idris, for exactly the same reason.

purple-leafy

9 months ago

Maybe I’m misunderstanding, could you give me an example?

Do you mean the fact that it can imply a variables type from assignment?

Edit: I’m plainly wrong, mishmashing words.

Yes JavaScript has a dynamic type system

javcasas

9 months ago

Type systems don't deal with variables. Type systems deal with interactions between values. Maybe those values are inline, maybe they are stored in variables.

You don't imply anything from an assignment other than the variable now has or is pointing to the new value. This is the same in every programming language. The only difference is that some programming languages gatekeep what you can assign to a variable based on types.

javcasas

9 months ago

TS is fine. Some people overengineer it absurdly. But in decent quantities is fine.

I have recently used NextJS, after not using it for a few years. It feels like it has jumped the shark. Meh new features bur requires redoing many things.