5 ms·
The Prototype's Language
- denamadem 2y ago[flagged]
- packetlost 2y agoI'm not sure I would want to use Python for anything that remotely touches money. It's far, far down on my list of languages I would use for something that has serious consequences for being incorrect.
- incrudible 2y ago…but is Java such a language? Wrapping everything in a hundred layers and making interfaces for everything, as is tradition, that is also a great way to create errors that are not obvious and will never be tangible by formal analysis.
- packetlost 2y agoYou can absolutely write good Java, the language gives you the tools to do so. Just because the reputation Java developers got in the 2000s was of over-abstracted gunk does not mean the language is not a good choice, especially post Java 21. The problem is Python does not give you the tools you need be certain of its behavior.
- incrudible 2y agoBut it does, static typing has been a thing for a while. The ecosystem just is not quite there yet, much like the Java ecosystem is not quite over its overabstracted gunk phase.
- packetlost 2y agoNo. Python's static typing is a complete joke. The core tools are overly lenient by default and without enforcement of anything at runtime you will be bitten sooner or later. I've spent several years with a very large, fully type annotated codebase and it's just not sufficient.
- dkarl 2y agoThe article really needs to explain how a comparison of Python to Java is supposed to explain what languages people choose for new services in 2024. Why aren't other languages on the table? Even taking it at face value that the choice is between Python and Java, the article leaves so much unaddressed. > a good plan executed now trumps a perfect plan done next week In what universe does this apply to a payments system? Hatred for Java is burned deep in my soul, and I've spent an unreasonable amount of time on this very web site carefully articulating reasons why I think Java is a crufty relic whose design reflects a bunch of discredited beliefs from a quarter century ago. But gosh, if I had to choose between Java and Python for a payments system, I think I might choose Java.
- cyberax 2y agoJava just got unlucky to become popular at the height of "object oriented" era (hey, anyone here remembers EJB?). But it was interesting to see it evolving. It was one of the first large language ecosystems to adopt language-specific package repositories, with dependency tracking, and project-specific scopes (unlike CPAN or CTAN that installed modules globally). It also evolved from the XML hell of EJB to the more sane Spring Framework. Java IDE evolution was also unique. The first IDEs were just text editors, but then Eclipse and JetBrains IDEA revolutionized semantic text editing. The online type checking and linting in modern IDEs was popularized by these two IDEs!
- seanmcdirmid 2y agoVisual Studio 1997 was the first IDE to really do code completion well, but that was also inline with the Java era.
- cyberax 2y agoYes, and there was also VisualAge for Java around that time. IDEA and Eclipse were among the first IDEs that modeled the complete source code with 100% fidelity, so you could rely on their analyses of usages to do automated refactoring. And they worked by parsing plain text source files, instead of keeping the code in a special database like in VisualAge.
- c4pt0r 2y agoI can imagine a single uncaught exception bringing down the entire payment system...
- LudwigNagasena 2y agoAn internal error occurred during: "Payment". java.lang.NullPointerException
- JonChesterfield 2y agoI'd happily prototype things in python 2.7 but not in 3.something. The ratio of looking up documentation to building stuff has gone badly downhill. Sadly most dependencies no longer run on 2.7 because 3.0 was better in some sightly unclear fashion so python 2.7 is now, finally, essentially dead. But whatever, we've still got lua 5.1ish. The rest of the article is coherent, including the properties you want in the language, I just think python in particular has catastrophically lost its way.
- rzwitserloot 2y agoThe post just skips over _why_. It states that Python is 'more modern' than java as an axiom. This is not a particularly easily adopted axiom. For example, python is in fact older than java. Which surely isn't what the author is talking about. But what _is_ the author talking about? It just isn't said. It merely states that the argument 'python is slow' is no longer relevant. It doesn't even state a reverse argument (why python would be better than java), and thus doesn't even begin to allow waylaying _those_. As a trivial example, perhaps the author means: A nominally, strongly, explicitly typed languages is obsolete. In which case - how does that explain how, for example, typescript has happened, which actively _re-introduces_ these aspects to a language? Clearly then, 'python is superior' cannot be taken as a truth universally held and requiring no logical argument. The rest, sure, whatever - "Programming language used has a significant impact on what you can write and how one would write it" is.. kinda obvious, no? Turing machine logic says that it is _literally_ incorrect (anything you can compute in one, you can compute in the other), but that _is_ something all those with a modicum of programming experience probably take for granted. You _can_ write a compiler in brainfuck, but, that'd be insane. The tricky argument isn't stated, the obvious arguments are. I surely must be missing the point of this post.
- ModernMech 2y ago> how does that explain how, for example, typescript has happened, which actively _re-introduces_ these aspects to a language? Also doesn't explain the ongoing efforts to do the same to Python. People aren't trying to remove the GIL because no one cares about Python speed.
- LudwigNagasena 2y agoPeople are trying to remove the GIL. https://news.ycombinator.com/item?id=36643670 https://news.ycombinator.com/item?id=36643670
- ModernMech 2y agoSorry I wrote my reply in a confusing double negative, but yeah that’s what I was talking about. They are doing this because people care about speed.
- fwlr 2y agoNo no no, it’s 2024, we write everything in Rust now
- stitched2gethr 2y agoIn this case I think you're on the right path.
- stitched2gethr 2y ago> The single most impactful technological choice when building payments is the programming language. Got it. So why was Python chosen again? Call me crazy but I want things that touch my money to be rock solid.
- rickydroll 2y agoRemember, it's not the language. You can write COBOL in any language. I want to see good techniques, testing, and practices in any code that touches my money. I don't care what language they write it in.
- constantcrying 2y ago>You can write COBOL in any language. That just isn't true. There are languages which force on you a minimum standard of quality and eliminate errors. E.g. static typing makes a whole range of errors impossible, similarly to how rusts borrow checker makes certain other kinds of errors impossible. In a sense you get test cases for all of these errors for free, as the compiler verifies they aren't present. Of course bad software can be written in any language. But some, like python, make sure it is as easy as possible.
- incrudible 2y agoOne could argue that Python forces you to write an enormous amount of regression tests, which will help build an understanding of the system. Whether that is more productive at the end of the day is a different question.
- constantcrying 2y ago>Python forces you to write an enormous amount of regression tests It doesn't. You can just have it break occasionally.
- rickydroll 2y agoThe concept of "writing COBOL in any language" does not refer to the quality of the code, only the shape of it. You can tell a coder's core language by a couple of properties, such as seeing how their code is laid out on the page or how they use variables. For example, Fortran users have and do write very clean code, especially in the scientific community. However, you can always tell who has written Fortran because loop variables are almost always i,j,k,l The other such patterns include where you put block markers (braces, begin/end, if/fi), naming conventions for variables. You can always tell who's a Java programmer because they can only fit a couple of funcitno/variable names per line. But as I joke about Java and naming, that's another giveaway. How do people name variables, methods etc. You're right, though. It's also not hard to write bad code in any language stylistically consistent with the language and its community. I've seen so much bad C/C++ that was perfectly organized and structured C code.
- ModernMech 2y ago> The moral of the story is that in formal systems, how you express problems impacts what problems you can solve. An interesting exercise many programmers don't do but should is to program purely in paradigms other than imperative OOP. The solutions you come up with are very different when you don't have objects, for loops, and if statements in your language's vocabulary. Try writing a real program in Prolog or SQL. Not just database calls to retrieve data, but an actual full app with a UI and user interaction and network calls and all the rest. You will likely feel like a novice programmer if you haven't trained your brain to think in set operations like union, join, intersect, etc. When everything in your program is a set instead of a stateful objects, you do set operations over them instead of method calls. That's uncomfortable and disorienting at first. As for the article, I didn't get much from it past the bit I quoted. FWIW that PG quote is fully out of date; I do not associate Python with programmer competency. The first thing I ask when a programmer says they know Python is "What other languages do you program in?", because I've come across far too many Python programmers who can't tell a stack from a heap. YMMV
- hiAndrewQuinn 2y agoMeanwhile, here in reality, I've been digging deep into Java precisely because Python just isn't cutting it when I'm trying to make the switch into "real" software engineering from my software project lead role (where I end up coding half the time anyway, I just don't get any recognition for it).
- denamadem 2y ago[flagged]
- denamadem 2y ago[flagged]
- denamadem 2y ago[flagged]
- denamadem 2y ago[flagged]
- denamadem 2y ago[flagged]
- denamadem 2y ago[flagged]
- denamadem 2y ago[flagged]
- denamadem 2y ago[flagged]
- denamadem 2y ago[flagged]
- denamadem 2y ago[flagged]
- denamadem 2y ago[flagged]
- denamadem 2y ago[flagged]
- denamadem 2y ago[flagged]
- denamadem 2y ago[flagged]
- denamadem 2y ago[flagged]
- denamadem 2y ago[flagged]
- denamadem 2y ago[flagged]
- denamadem 2y ago[flagged]
- denamadem 2y ago[flagged]