Earlier quoted context omitted.
I write and test a lot of both rust and python, so I can say quite confidently: 1. Of course a type system is not as "flexible" as arbitrary test code. 2. Compiler-enforced type safety is many orders of magnitude easier to maintain than the equivalent unit tests 3. Defining rigorously enforced invariants with a type system is far, far more powerful than hoping you remembered to test all the important cases.
Your 2-3 points remind me of the quote by Ludwig Wittgenstein: “The limits of my language means the limits of my world.” Of course if you limit yourself only to problems that can be effectively solved by type system, then it may work. It is like limiting yourself only to those text processing tasks where regexs work. Yes, some text processing tasks may be much more effectively solved using a regex. But it is obvious…
What do I think about Lua after shipping a project with 60k lines of code?
141–146 of 146 posts
Re: What do I think about Lua after shipping a project with 60k lines of code?
#142Interesting article, although I am confused by the section referencing 'functional vibes' as the examples given just looks like standard code.
Re: What do I think about Lua after shipping a project with 60k lines of code?
#143Earlier quoted context omitted.
Your 2-3 points remind me of the quote by Ludwig Wittgenstein: “The limits of my language means the limits of my world.” Of course if you limit yourself only to problems that can be effectively solved by type system, then it may work. It is like limiting yourself only to those text processing tasks where regexs work. Yes, some text processing tasks may be much more effectively solved using a regex. But it is obvious…
So you asked a question, didn't like the answer, and decided to just start insulting people instead?
Re: What do I think about Lua after shipping a project with 60k lines of code?
#144Earlier quoted context omitted.
> TypeScript compiler essentially treats types as a lint Sorry, I think you've been swindled. The Typescript compiler is made by Miscrosoft and is called tsc. It very much heeds the type annotations, and very much rejects ill-typed programs. An LSP based on it does the same in an editor. Also tsc supports refinement types via flow control analysis and a bunch of other static correctness checks. Deno, bun, swc are not…
> and very much rejects ill-typed programs No it doesn't. Even on the strictest settings, Typescript is unsound in trivial ways, which I hit every time I use it in anger (e.g. undefined in unassigned variables). And Microsoft libraries seem perfectly ok with asserting their type errors away without any validation, specially for JSON values. I had a similar experience with Python until I found Pydantic. I haven't had…
Sadly no, and it will likely not be fully ready for years still. It's not a funded work and only a few people are working on it (AFAICT) and the core team understandably wants gradual movement and no incompatibilities.
Elixir made me rediscover love for programming and gave me productivity I never dreamed of. But after using it for 9 years, the lack of static typing really started getting on my nerves. There are only so many times you can do manual exhaustive pattern-matching on the hot paths that yell errors in production before you start feeling envious of Rust and Haskell.
Re: What do I think about Lua after shipping a project with 60k lines of code?
#145Earlier quoted context omitted.
Agreed. I had to work in a larger Python codebase after spending a few years with Go and Rust and the drop in logical confidence around the language was remarkable. I have, roughly, sworn off dynamic languages at this point. Although I have dreams of implementing a firm typed system over Common Lisp.
Firm like: https://coalton-lang.github.io/20211010-introducing-coalton/ ?
Re: What do I think about Lua after shipping a project with 60k lines of code?
#146Earlier quoted context omitted.
Agreed. I had to work in a larger Python codebase after spending a few years with Go and Rust and the drop in logical confidence around the language was remarkable. I have, roughly, sworn off dynamic languages at this point. Although I have dreams of implementing a firm typed system over Common Lisp.
I’m assuming that Python code base didn’t have thorough type hints. What if it had? Would Go still feel safer? I know these aren’t checked in runtime, but Python type system seems more thorough than Go’s, so shouldn’t a Python code base fully typed be even safer than Go? If so, why not? (I know Python type checks aren’t mandatory, but for this question assume that the type checker is running in CI)
It's not about feeling. It's about the theorems you can make about the codebase. With Python the answer actually is ¯\_(ツ)_/¯.