←back to thread

517 points bkolobara | 7 comments | | HN request time: 0.019s | source | bottom
Show context
koakuma-chan ◴[] No.45041723[source]
I encourage every one to at least stop writing code in Python.
replies(5): >>45041794 #>>45041941 #>>45042073 #>>45043031 #>>45049992 #
nilslindemann ◴[] No.45042073[source]
People who recommend that other people stop using one of the best documented languages on the planet with a huge library ecosystem, a friendly user base, a clean syntax, excellent reference documentation, intuitive function names, readable tracebacks, superb editor and AI support.
replies(4): >>45043352 #>>45047061 #>>45049815 #>>45050106 #
ironmagma ◴[] No.45047061[source]
Intuitive function names like __new__() and __init__()? Or id() and pickle.dumps()?

The accessibility of Python is overrated. It's a language with warts and issues just like the others. Also the lack of static typing is a real hindrance (yes I know about mypy).

replies(4): >>45047737 #>>45049157 #>>45050117 #>>45051376 #
extraisland ◴[] No.45051376[source]
> Intuitive function names like __new__() and __init__()? Or id() and pickle.dumps()?

I use python for some basic scripting and I don't write anything huge. Most of these do roughly what I would expect.

> __new__ is a static method that’s responsible for creating and returning a new instance (object) of the class. It takes the class as its first argument followed by additional arguments.

> In Python, __init__ is an instance method that initializes a newly created instance (object). It takes the object as its first argument followed by additional arguments

> Python id() function returns the “identity” of the object. The identity of an object is an integer, which is guaranteed to be unique and constant for this object during its lifetime.

The pickel.dumps() is the only one that is a bit odd until to find out what the pickle module does.

> The accessibility of Python is overrated.

The accessibility isn't overrated. Python has something that is missing from a lot of languages that isn't often talked about. It is really good a RAD (Rapid Application Development). You can quickly put something together that works reasonably well, it also is enough of the proper language that you can build bigger things in it.

> It's a language with warts and issues just like the others.

Like every other one.

replies(1): >>45064817 #
ironmagma ◴[] No.45064817[source]
The difference between new and init is not knowable from reading their names. The same is true of pickle. By definition, that makes them unintuitive.

A lot of languages work for RAD including Clojure, C#, and JavaScript. This is nothing special about Python.

replies(1): >>45065581 #
1. extraisland ◴[] No.45065581[source]
>The difference between new and init is not knowable from reading their names. The same is true of pickle. By definition, that makes them unintuitive.

By that standard nothing is. At some point if you are using a programming language you are going to have to RTFM. None of things you cherry-picked would be used by a novice either.

Every example you gave are what I call are "Ronsil" (https://en.wikipedia.org/wiki/Does_exactly_what_it_says_on_t...).

Even the pickle.dumps() example is obvious when you read the description for the module and works exactly the same to json.dumps(), which works similarly to dumps() methods and terminology in other programming languages.

I feel like I am repeating myself.

> A lot of languages work for RAD including Clojure, C#, and JavaScript. This is nothing special about Python.

Nonsense. None of those I would say are RAD. JavaScript literally has no standard lib and requires node/npm these days and that can be a complete rigmarole in itself. C# these relies heavily on DI. I have no idea about Clojure so won't comment.

All the RAD stuff in C# and JS is heavily reliant on third party scripts and templates, that have all sorts of annoying quirks and bloat your codebase. That isn't the case with Python at all

replies(2): >>45066043 #>>45070222 #
2. ironmagma ◴[] No.45066043[source]
> By that standard nothing is.

Okay, and? I didn't make the claim that some other language was all that. I was dispelling the claim that Python is.

> Even the pickle.dumps() example is obvious

Well, we've so far been restricted to function names which is what the claim was. There are plenty of cryptic other names in Python like ABCMeta, deriving from `object`, MRO, slots, dir, spec, etc.

The idea you can't do RAD with libraries is insane. Games are developed rapidly, and a lot of game engines use C#. The fact that you're using Unity, a very large dependency, means nothing regarding whether you can do RAD, which is more about having the right architecture, tooling, and development cycle.

replies(1): >>45067009 #
3. extraisland ◴[] No.45067009[source]
> Okay, and? I didn't make the claim that some other language was all that. I was dispelling the claim that Python is.

I believe that people should RTFM. Any arguments that is predicated on not reading the documentation for the language, and then pretending that it is somehow opaque, I am going to dismiss to be quite honest.

> Well, we've so far been restricted to function names which is what the claim was. There are plenty of cryptic other names in Python like ABCMeta, deriving from `object`, MRO, slots, dir, spec, etc.

You are still cherry-picking things to attempt to prove a point. I don't find this convincing.

> The idea you can't do RAD with libraries is insane. Games are developed rapidly, and a lot of game engines use C#. The fact that you're using Unity, a very large dependency, means nothing regarding whether you can do RAD, which is more about having the right architecture, tooling, and development cycle.

I didn't say that you can't do RAD with libraries. You didn't understand what I was saying at all.

I can get up and running with Python in mere minutes. It doesn't require a application templates/scaffolding apps to get started (like C# and JS/TS). You just need a text editor and a terminal. Doing that is still quicker and easier to get something working than all the gumpf you have to do with the other languages. I BTW was a JS/TS and .NET for about 15 years

I just wish there were more Python and Go jobs in the UK.

replies(1): >>45068068 #
4. ironmagma ◴[] No.45068068{3}[source]
C# does not require scaffolding any more than Python does. It comes with a large standard library (aka .NET). Even the NodeJS standard library is quite large now too. How much setup you need really depends on what you are trying to do; if you are using Django, there will be an insignificant amount of that, and some of the most complicated setups I've seen have been with Pylons/Pyramid. If you're just making a CLI app, well I don't see how it's any less setup with Python than with Node. And anyway, RAD isn't about setup time, it's about iteration time.

I feel you on the lack of Go jobs. It seems like they aren't very well globally distributed...

replies(1): >>45071242 #
5. balencpp ◴[] No.45070222[source]
R.E. scaffolding in C#, with upcoming .NET 10, it's really simple: - Write code to myfile.cs - `dotnet run myfile.cs`

That doesn't need scaffolding either. And the standard library is huge too; you could even add dependencies in that file.

And since we're talking about RAD, Python can't even compare to Clojure. Having a separate REPL "server" that you interact with from your text editor with access to the JVM's ecosystem and standard library inside of a "living" environment and structural navigation from being a LISP is pure RAD. Heck, I often start a REPL "server" inside chrome's devtools with scittle[1] if I need to rapidly and programmatically interact with a website and/or to script something; I haven't been able to do that anywhere else. Even pure JS.

[1]: https://github.com/babashka/scittle

replies(1): >>45071446 #
6. extraisland ◴[] No.45071242{4}[source]
> C# does not require scaffolding any more than Python does.

They've changed so much in the last few years I honestly don't know anymore. Which is part of the entire problem.

The last time I bothered writing anything with C# / .NET was .NET 8. They definitely had scaffolding tools for popular project types. Setting stuff up from a blank project wasn't straight forward.

> It comes with a large standard library (aka .NET). Even the NodeJS standard library is quite large now too.

I find dealing with C++ and CMake/Make (I hobby program Vulkan/OpenGL) easier than dealing with Node JS and NPM. People think I am being hyperbolic when I say this, I am not. Which show you how insane the JS ecosystem is.

I am honestly fed up of both C# and JS. There are far more headaches with both (especially if you are using TypeScript).

If you use TypeScript and don't want to use babel, until recently you have to basically use tsx or tsnode . You then have to wrangle a magic set of options in the tsconfig.json to have some popular libraries work.

.NET after 5 has absolute DI madness in ASP.NET and none of it seems documented properly anywhere (or I can't find it) and it seems to change subtly every time they update .NET or ASP.NET.

I ended up resorting to pulling down the entire source code to see what the Startup was doing. C# now has total language and syntactic sugar overload.

I have almost none of these headaches with Python and Go.

> And anyway, RAD isn't about setup time, it's about iteration time.

It is both. I find Python quicker, easier and less headaches that either JS or .NET. I am well versed in C# and JS.

I know less Python than .NET and JS/TS, yet I find it easier.

> I feel you on the lack of Go jobs. It seems like they aren't very well globally distributed...

That is true. I am sure most Go jobs advertised in the UK are in London.

7. extraisland ◴[] No.45071446[source]
> R.E. scaffolding in C#, with upcoming .NET 10, it's really simple: - Write code to myfile.cs - `dotnet run myfile.cs` > That doesn't need scaffolding either. And the standard library is huge too; you could even add dependencies in that file.

I've just had a quick look at some of this and they've basically just moved stuff in to the cs file from the proj file. I remember them saying this was on the roadmap when I was doing a .NET 8 refresher.

   // app.cs
   #:package Humanizer@2.*

   using Humanizer;
It also seems anything non-trivial will still require proj files. Which means that they are likely to still have project templates etc.

> And since we're talking about RAD, Python can't even compare to Clojure.

I am unlikely to ever use Clojure, I certainly won't be able to use it at work.

> Having a separate REPL "server" that you interact with from your text editor with access to the JVM's ecosystem and standard library inside of a "living" environment and structural navigation from being a LISP is pure RAD. Heck, I often start a REPL "server" inside chrome's devtools with scittle[1] if I need to rapidly and programmatically interact with a website and/or to script something; I haven't been able to do that anywhere else. Even pure JS.

All sounds very complicated and is the sort of thing I am trying to get away from. I find all of this stuff more of a hinderance than anything else.