Live data from Hacker News

Python at Scale: Strict Modules

instagram-engineering.com

201–210 of 259 posts

Re: Python at Scale: Strict Modules

#201
Wow. Talk about solving the wrong problem!

Millions of lines of code in a monolith. 20s start up time. Meta monkey patching. One unit test per process... Yikes!

Software architecture, anyone?

Maybe Instagram should get a copy of Michael Feathers' book...

Re: Python at Scale: Strict Modules

#202

More and more I want someone to create a new language that amounts to a strict subset of Python, with mypy built-in, and is compilable into machine code. Python has by far my favorite syntax, community, and in my experience leads to the greatest productivity. There just happens to be a lot of overly dynamic features, that aren't even used by most, but used just enough to hold back optimization and structural improvem…

I can imagine the next big programming language will be one that is split into two language-variants: the "low-level-variant" and the "high-level-variant".

The high-level-variant is a dynamic language with optional typing, which is good for scripting, fast prototyping, fast time-to-market, etc.

The low-level-variant is similar to the high-level-variant (same syntax, same features mostly, same documentation), but it has no garbage collector, typing is mandatory and it runs fast like C/C++/Rust. Compiled packages that are written in the low-level-variant can be used from the high-level-variant without additional effort at all. The tooling to achieve this comes with the language.

A language like this would be insane, IMHO.

Re: Python at Scale: Strict Modules

#203

More and more I want someone to create a new language that amounts to a strict subset of Python, with mypy built-in, and is compilable into machine code. Python has by far my favorite syntax, community, and in my experience leads to the greatest productivity. There just happens to be a lot of overly dynamic features, that aren't even used by most, but used just enough to hold back optimization and structural improvem…

I can imagine the next big programming language will be one that is split into two language-variants: the "low-level-variant" and the "high-level-variant". The high-level-variant is a dynamic language with optional typing, which is good for scripting, fast prototyping, fast time-to-market, etc. The low-level-variant is similar to the high-level-variant (same syntax, same features mostly, same documentation), but it h…

A key consideration here would probably be the expression and passing around of managed instances spawned in the high-level variant through low-level code. Would you explicitly retain and release them? -- etc. I think it should be an ergonomic solution for this language to provide an edge over just using C / C++ / etc. with Lua / Python / etc.

Re: Python at Scale: Strict Modules

#204
post #186
post #162

Earlier quoted context omitted.

> C++ is a hydra of complexity, sure it has it's place, but it's not nearly as productive as Java for your typical web application. Modern C++ well is as productive ( probably even more productive ) as Java. The main issue with C++ is recruitment, C++ engineers are rare because C++ is barely teached.

Any good university has C++ related classes. The problem with modern C++ is having many devs to actually make use of it. Many devs don't care to follow up on modern language X best practices, rather just typing away something that works.

[deleted]

Re: Python at Scale: Strict Modules

#205
post #192

Earlier quoted context omitted.

What would you say are the biggest blockers to becoming realistic? I saw on the README they need tools in the Python ecosystem to start utilizing them, which I can help with starting with isort, beyond that I'd want to do whatever I can to help the project succeed.

Probably the biggest issue is that it can't run many libraries and frameworks because they use a lot of dynamic features, i.e. reflection and metaprogramming. To be more specific: getattr, operator overloading, descriptors, heterogeneous dicts, decorators, etc. Type checking and metaprogramming are fundamentally at odds [1]. Dynamic languages like Python have more of a focus on the latter. They later added type check…

> type checking and metaprogramming are fundamentally at odds [1]

I would say that dynamic metaprogramming is at odd with type checking (and optimizations, and in general understanding the behaviour of a program statically). But of course metaprogramming can be done perfectly fine in a statically typed language.

Re: Python at Scale: Strict Modules

#206
post #200
post #182

Earlier quoted context omitted.

Kotlin is meaningless without Java. It is a fools errand to think Kotlin/Native would ever overtake Java. Only on Android it might have a future, if Fuchsia never becomes a thing.

Kotlin might become the default Java syntax, that's what the GP is saying. And I agree.

Java is Java.

On what concerns the JVM, Kotlin hype will be over in a couple of years, and it will get as much use as Scala, Clojure, Beanshell, Groovy enjoy nowadays.

Guest languages never get to own a platform, and with time all platform languages end up getting enough features that the large majority of developers never bother with extra tooling, debugging layer and idiomatic wrapper libraries of the guest languages.

Re: Python at Scale: Strict Modules

#207

More and more I want someone to create a new language that amounts to a strict subset of Python, with mypy built-in, and is compilable into machine code. Python has by far my favorite syntax, community, and in my experience leads to the greatest productivity. There just happens to be a lot of overly dynamic features, that aren't even used by most, but used just enough to hold back optimization and structural improvem…

I can imagine the next big programming language will be one that is split into two language-variants: the "low-level-variant" and the "high-level-variant". The high-level-variant is a dynamic language with optional typing, which is good for scripting, fast prototyping, fast time-to-market, etc. The low-level-variant is similar to the high-level-variant (same syntax, same features mostly, same documentation), but it h…

You can say that this is typescript and assemblyscript, they have the same syntax but one of them is compiled natively (wasm).

Re: Python at Scale: Strict Modules

#208
post #180
post #89

Earlier quoted context omitted.

What "future proofing"? It's not like Julia is "the future" it's just a contended, and it's not doing that good at that either...

Its adoption at banks and life science research labs tells another story. Naturally if the community finally gathers around PyPy, that might change.

>Its adoption at banks and life science research labs tells another story.

In all 10 of the places it was adopted?

Compared to Python with the thousands of deployments "at banks and life science research labs" it's a no show....

Re: Python at Scale: Strict Modules

#209
post #131

Earlier quoted context omitted.

In my assessment, not really. They are surprisingly spot on (for the top spots and singling out contenders). Not to mention the language landscape is almost static at the top. Nobody's gonna came and take Python, Java, C, C++, JS, out in the next 10-15 years... Only a huge self-blunder, like the Perl 5 -> 6 transition, and only at much more volatile time (when paradigms change, e.g. when web dev changed from CGI, Per…

Well, for instance, TIOBE has Rust at #34, below such mainstays as ABAP, COBOL, and Scratch. It has Groovy above Ruby.

Well, Rust is probably well under COBOL, that's for certain.

Not in momentum, but there are tons of installations, and billions of lines of code in COBOL ever churning. If LOC was the main criterium (and not just a factor), and if COBOL projects were hosted in GitHub, most languages with be dwarfed by it.

And Groovy is semi-popular in the Java world, which is huge itself.

But as I said, TIOBE is very good in the top-10 languages, and for spotting new major contenders (by how they jump up spots).

It's not great for relative ranking of the longer tail of languages above the top-10 / top-20...

Re: Python at Scale: Strict Modules

#210
post #207

Earlier quoted context omitted.

I can imagine the next big programming language will be one that is split into two language-variants: the "low-level-variant" and the "high-level-variant". The high-level-variant is a dynamic language with optional typing, which is good for scripting, fast prototyping, fast time-to-market, etc. The low-level-variant is similar to the high-level-variant (same syntax, same features mostly, same documentation), but it h…

You can say that this is typescript and assemblyscript, they have the same syntax but one of them is compiled natively (wasm).

Something in that direction, but I'd imagine it more like a Rust with a high-level-variant than a JS/TS with a low-level-variant ;)
Post reply on HN