Live data from Hacker News

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

github.com

51–60 of 117 posts

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

#51

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…

JS core (that's worth knowing) is pretty simple. My mental model is basically there are primitive types, arrays [], objects {}, and Promises. After that, you basically just have to understand the event loop and you're good to go. Then there's other special things like async/await, spread operator, etc. Among programming languages, it doesn't have THAT many things to learn at its core.

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

#53
post #31
post #7

Earlier quoted context omitted.

> why untyped languages became popular to begin with because for a long time there were no mainstream languages with a good enough type system.

Types slow you down. New work is first completed in untyped languages. People start using the work. People complain there aren't types. Types are added. Work is now slow in the language. New work is now done in another language without types. Rinse and repeat.

I think its more along the lines of things are prototyped without types, the proof of concept mostly works, then people realize that types are needed to reduce bugs, improve speed, and create a maintainable base as the project grows. What people should do is rewrite from scratch using the prototype as a vague guide, but instead people try to desperately fix the prototype incrementally. Its not the types that makes things slow, its the size of the codebase, and the lack of expectations on quality and performance.

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

#54

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.

You're talking like it's still 2010. Modern incarnations of both of those languages are pretty great.

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

#55
post #31
post #7

Earlier quoted context omitted.

> why untyped languages became popular to begin with because for a long time there were no mainstream languages with a good enough type system.

Types slow you down. New work is first completed in untyped languages. People start using the work. People complain there aren't types. Types are added. Work is now slow in the language. New work is now done in another language without types. Rinse and repeat.

If the language has clear and consistent ways to convert types when needed, the "slow down" from types is trivial.

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

#56
post #17

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…

Yep. Everything comes in cycles, old becomes new again, etc. This is particularly true in the software industry. We're very fad-driven.

Is this the case here too though? My impression was that dynamic languages grew popular because of deficiencies in static type systems, making it hard to express things while requiring a lot of boilerplate and not providing enough runtime safety (e.g. NullPointerException), and a faster feedback cycle, as you need a compile step and need the entire program to be free of type errors. For the first point, type systems have been improving in these regards, and for the second you get instant feedback in statically typed languages without needing to even run anything. Some languages like Roc even let you run code while there are type errors in other code paths.

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

#57
post #31
post #7

Earlier quoted context omitted.

> why untyped languages became popular to begin with because for a long time there were no mainstream languages with a good enough type system.

Types slow you down. New work is first completed in untyped languages. People start using the work. People complain there aren't types. Types are added. Work is now slow in the language. New work is now done in another language without types. Rinse and repeat.

I dunno, I think the productivity promises of dynamic typing have been conclusively disproven, so maybe next time people will be able to at least say "we know that isn't a good idea".

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

#58
post #31
post #7

Earlier quoted context omitted.

> why untyped languages became popular to begin with because for a long time there were no mainstream languages with a good enough type system.

Types slow you down. New work is first completed in untyped languages. People start using the work. People complain there aren't types. Types are added. Work is now slow in the language. New work is now done in another language without types. Rinse and repeat.

“Types slow you down” is the _stupidest_ excuse I hear all the time.

As if developers of untyped languages don’t spend ungodly amounts of time pretending types don’t exist, but needing to manually check them everywhere, wonder why shit blows up at runtime, litter their code with “typeof” style checks, litter their tests with type checking.

The types exist and need to be considered whether you believe it or not. Might as well let the computer help you out.

Or you know, pretend you’re toooooo cool for it.

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

#59
post #2

I always wonder why inference a la Hindley-Milner isn't what people push as the best of both worlds.

Inference for static types requires more from the compiler in two key ways that impact the developer experience. First, it's just plain more work to do when compiling, so compile times are longer than they might otherwise be. Second, error handling and messaging needs to be written very carefully to avoid dense and unhelpful output when inference fails. It's positive in many ways, but it's not a free lunch.

It's not a free lunch. But it's better than in projects where I'm forced to supply a type annotation everywhere in a dynamic language.

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

#60
post #31
post #7

Earlier quoted context omitted.

> why untyped languages became popular to begin with because for a long time there were no mainstream languages with a good enough type system.

Types slow you down. New work is first completed in untyped languages. People start using the work. People complain there aren't types. Types are added. Work is now slow in the language. New work is now done in another language without types. Rinse and repeat.

that might have been true in the 2000s, but it doesn't apply to modern languages with things like generics, ADTs, type inference, null safety, etc.

you know what really slows me down? trying to use a function in a dynamic language, and having no god damned clue what type of arguments it accepts, and having to figure it out by grepping through the code or dynamically instrumenting a running program.

Post reply on HN