Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

IMO it's better to just use TypeScript anywhere that you'd normally use Perl. The type safety helps later on when you revisit old code plus I think it's more productive overall, having used Perl many times in the past.


The Javascript ecosystem (to which Typescript belongs) makes the Perl ecosystem of twenty years ago look modern and streamlined.


Nooooo. Python's the clearest front-runner in the Perl replacement game. I wish it were Ruby, but it's pretty clearly Python. TS changes too fast and requires too many tools, it's not even a serious contender in this category, though I much prefer it to any of the above for large programs.

Python has some semi-decent type hinting, these days. It's not so bad, it'll keep you out of most of the same trouble that TypeScript does.


Typescript is a great remedy when you are forced to use JavaScript. But in a context where you can use any language it makes zero sense. If you want static types just use C# or whatever, otherwise just use Python.


While I see benefits of TypeScript's type system, I think the lack of a special compilation step is a big win for Perl, at least in the author's eyes. (Yes, I know Deno is a thing, but I'm not sure of the extent which the author considered it).


You can run ts-node to execute TypeScript to run it without having to manually compile it first. Although if you have a large TypeScript program with a lot of dependencies or on an older machine, I guess it could take some time. With my own scripts I've only seen it take a few seconds at most.


Slightly easier to start using Type::Tiny[1] than switching languages.

[1] https://metacpan.org/pod/Type::Tiny




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: