112 points · by mikece · 3y ago · 71 comments
1. Rust for if i want something C++-esque. Rich stdlib & crates, i love it. My primary language for everything.
2. Zig for if i need C. Interesting language, but i can't speak from personal experience. Seems to be gaining a lot of traction, makes nice choices, feature rich in the right places, etc.
3. ??? for when i want Python.
I'm asking about #3. Who (if anyone?) is making an attempt at "new and better Python"?
.. and yes i know, all these languages i mentioned, including Python, are not dead, are loved by millions, and are all very productive. My statements are not implying that they are anything but amazing. Please don't yell at me :)
Attempting to list some "better Pythons" by area, and the catches:
- golang for web: seems good and simple but also less dynamic
- Julia for scientific programming: Julia users are convinced it's better but converts are not queuing up. Also the story outside scientific programming is less convincing. Almost all ML/AI research is written in Python
- glue language / generic file wrangling... Not sure if there is a clear contestant!
- (shamelessly stolen from sibling comments) nim as a like for like faster/better replacement: faster and seemingly quite (still less) dynamic, but smaller ecosystem and unclear governance - currently one man and his GitHub login.
Incidentally, I think this "second best at everything" meme-fact is part of its success. There is a huge pool of people using Python for one purpose, who, confronted with a new need, can also use Python, even if it's not the best tool for the job. It integrates easily with whatever else is written in Python, and it's one less language to learn. This is IMHO where complaints like "why people use Python for X when it sucks" miss the point.
There are enough of them, even if HN isn't paying attention,
Replacing Python is not practical right now because it is more comfortable to use a language that doesn't try to be everything to everyone, and that means that it will be built on a base language — in Python's case, C. That ground is shifting, and nobody is sure if the new base will be Rust, Zig, something else, or if it will all blow over and C will come back. So the space isn't being targeted very much.
The only big thing to learn with Julia is the broadcasting syntax, other than that, Julia has a good macro system, so sometimes you see syntax that doesn't make sense without knowing what the macro does.
Strange as that is one of the reasons why Julia exists - fast Python.
> and the hodgepodge of syntax I see when I look at Julia samples is nauseating.
I honestly like the syntax. OTOH I dislike Pythons syntax somewhat.
...but then, I'm heavily invested into Python and it wasn't clear to me where Janet is materially better, for system scripting-type of issues. What am I missing?
I'm not saying Python is some pinnacle of language design. I'm learning Rust, because it's very obvious how it fills gaps that Python cannot cover. What's that gap for Janet?
In much the same way Perl was used for gluing different things together Raku does all of that, but better, in parallel, while providing you some hor d'oeuvres to nibble on while you write it.
Now, if only Crystal can make for a strong NIF language for BEAM...
* Attributes are no longer dynamic, __slots__-like behavior for everything by default
* GIL no more
* Base off of Pypy for JIT speed
* Real lambdas (I like how Lobster does this)
* Maybe make type annotations required (but with inference)
Python's syntax is so close to nearly perfect (if you don't mind tab-delimited code, I've gotten used to it)
I think it would go over better than people fear. If you do what you can to make the core language fast enough, C extension stop being as relevant. Right now, the Python ecosystem is absolutely held back by the FFI hell that it's stuck in.
As I said in the other comment, the compromise on everything is what makes it tick... I don't like all of it either, but I like a language that has top class support for ML, database connectivity, web programming, file wrangling, task orchestration and web scraping all in one. And even some poor but workable parallelization.
I thought I'd have more troubles with the case insensitivity thing, but it turns out, it wasn't a big issue at all, and UFCS is great.
Though there's still friction points I've been happy seeing the ecosystem grow lately. The compiler has seen a lot of bug fixes lately too which helps.
4. crystal for ruby
Between the less verbose syntax, and the library support - it's incredibly difficult to beat if you measure time to POC. For many, many applications like cli scripts, webservers, datamanipulation, etc. C/CPP/Rust/Go are inarguably slower to get to POC, and have a higher learning curve. The network effect is incredibly strong as well with the library support.
That said it'll be dirty. Might not be super fast, and it might not have all of the compile-time checking.
I think the big thing is that this "quick and dirty" solution is "good enough" for a lot of people. And if it isn't, that's when you start moving things to rust/go/etc.
That would be Perl actually.
This leaves Python in a space similar to JavaScript, where there isn't a really solid way to build a successor.
hello := 9
world := "world"Seems like an easy win for them to improve the structure of the guides/docs to get more users.
Other than that, it's powerful.
https://crystal-lang.org/reference/latest/syntax_and_semanti...
I honestly have no idea how anything could work if they were not tagged. Like how on earth would you know what method to invoke?
(Basically the programmer has to figure out how discrimination works - you’re kinda on your own).
Thanks team !
Other than that Crystal is fantastic and I hope to use it more in the future