Live data from Hacker News

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

github.com

71–80 of 117 posts

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

#71
post #10

this would be nice, but no, not going to happen. JavaScript, Python, PHP, Ruby etc fill a niche. Personally I love strongly typed languages, but I get why people don't want to deal with it. I am old school and do not use an IDE, so for me strong typing is a must.

Honest questions: What do you consider an IDE? Do you use syntax highlighting? I only ask because I use Sublime Text but the most I use is the file browser sidebar and syntax highlighting. I don't use any linters. I started with Ruby on Rails and Textmate and I've never needed anything fancy, even for 500k line Rails apps.

> Honest questions: What do you consider an IDE? Do you use syntax highlighting?

I use GVIM, no plugins. syntax highlighting is fine and file browser too, but once you start getting into autocomplete and plugins that too much I think. the IDE should not be a replacement for a poorly designed language, and that's what they have become I think.

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

#72
post #15

Earlier quoted context omitted.

> as the worst of both world YES YES YES. I'm witnessing this nightmare with a project that started out as untyped and now we're adding mypy to it because without typing it is difficult to understand and work on. 2 million lines of untyped python. It's basically a huge technical debt and I doubt we'll ever get to the point where we can enforce this in CI

That doesn't mean gradual typing is the worst of both worlds though? It's bad but it's still not as bad as no static types.

it's worst of both worlds because types are not free. There is a certain amount of energy and effort and maintenance that you must put into type annotations. Before you reach the point of return on that investment you have to plow through the period of limbo where the cost of annotations is greater than the rewards. Some codebases never make it out of that morass.

One could easily make the argument that adding types to a preexisting codebase is more difficult than adding them to a greenfield project. So the effort and energy (and cost) is even higher.

Let's just say, you better be snuffing out an absolute fuckton of null reference and other bugs that a type system can actually help with for it to be worth it.

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

#73
post #10

this would be nice, but no, not going to happen. JavaScript, Python, PHP, Ruby etc fill a niche. Personally I love strongly typed languages, but I get why people don't want to deal with it. I am old school and do not use an IDE, so for me strong typing is a must.

Honest questions: What do you consider an IDE? Do you use syntax highlighting? I only ask because I use Sublime Text but the most I use is the file browser sidebar and syntax highlighting. I don't use any linters. I started with Ruby on Rails and Textmate and I've never needed anything fancy, even for 500k line Rails apps.

[deleted]

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

#74
post #70
post #10

this would be nice, but no, not going to happen. JavaScript, Python, PHP, Ruby etc fill a niche. Personally I love strongly typed languages, but I get why people don't want to deal with it. I am old school and do not use an IDE, so for me strong typing is a must.

> I am old school and do not use an IDE, so for me strong typing is a must. I, too, prefer to avoid using an IDE. I appreciate strong typing, but I certainly don't feel that loosely or untyped languages are made more difficult to use by not using an IDE.

I use GVIM without plugins. So if I want to code some Python or JavaScript, I am looking at this:

    function hello(a, b) {
        return a + b;
    }
what the hell are "a" and "b"? numbers? strings? something else? no thank you.

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

#75
post #74
post #70

Earlier quoted context omitted.

> I am old school and do not use an IDE, so for me strong typing is a must. I, too, prefer to avoid using an IDE. I appreciate strong typing, but I certainly don't feel that loosely or untyped languages are made more difficult to use by not using an IDE.

I use GVIM without plugins. So if I want to code some Python or JavaScript, I am looking at this: function hello(a, b) { return a + b; } what the hell are "a" and "b"? numbers? strings? something else? no thank you.

Oh, sure, I completely understand where you're coming from. But if I'm using an untyped language, I'm already having to keep that sort of state in my head regardless.

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

#76
strong typing is great and there are more good choices now than ever.

however it does nothing to address main issue plaguing software since the dawn of time: apathetic and/or adversarial engineers.

the problem has always been people and the ways of organizing and incentivizing them to build large complex works.

pl choice hasn’t ever mattered much, still doesn’t, and likely never will.

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

#77
"Gradual typing" works as a sales pitch, but having had a go at that it, it's at best a way of getting the editor to give better autocompletion. It's only with strict mode on that I feel Typescript is really worth it.

The article also touches on Typescript-in-JSDoc, but that can get really ugly with complex types and there are a few things I just couldn't figure out how to do when I gave it a proper shot last year.

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

#78

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".

I wrote my first typescript this morning. I was trying to do something weird in React Native, which I've also never used before. I was getting red lines all over my editor. Saved. It hot reloaded anyway and ran the code and such. The errors I was getting were pretty inscrutable. I think that's the nature of untagged unions maybe? Anyways, it didn't actually put up the hard wall I'd expect a type system to do, and with that I wasn't in a dialogue with the compiler to get the types working and thus the program.

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

#79

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".

I'm half with you. I think TS is only worthwhile in strict mode, as soon as an "any" creeps in all bets regarding safety are off. Same story with trusting values returned from 3rd-party libs - everything needs validation.

But you talk about code quality... Honestly if I've got a tricky task the first thing I'll do now is write the types for it, they'll keep me on the right path.

Example: Next week's job is to add analytics to a codebase (I get all the glamorous tasks - well, actually just all the tasks), and the geniuses with the spreadsheets have come up with like 100 different events to track, each with a selection of sometimes-overlapping properties.

I've done this before in plain JS and it was unpleasant. In TS once I have the types nailed down the rest is easy - and when they inevitably change their minds about something the week after next I just alter the types to match and then follow the errors until it works again.

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

#80
post #21

Earlier quoted context omitted.

> What are the downsides of gradual typing on a codebase? Typing complex business domains and interactions is hard. Most developers don’t have a lot of experience with it or the time to do it properly as they produce features. It doesn’t help that many developers start their career with untyped languages and transition into typed languages without learning it properly. Typescript is a great example because a lot of f…

It's definitely not that the developers are inexperienced with types. You're sort of making a "white man's burden" argument. Very few web developers are just writing javascript at work. It's simply that you can't paint over a weakly typed language with strong types without causing all kinds of crazy edge cases. They're fundamentally different paradigms.

Are you asserting all developers are good with typing and its derivatives?
Post reply on HN