Hacker News new | ask | show | jobs
by librasteve 38 days ago
Many here propose replacing Python with more performant, but less familiar languages - mostly Rust, Go. But I find the argument that the AI - HUMAN interface is the most important. A simple version of this is “no, stick with Python if that’s what you know”. A more interesting version is “use this new found AI leeway to move up the abstraction level”, “try something more expressive and human oriented”, “make a DSL and parser that suits the domain (and focuses the AI)”. Despite being a minority language, Raku is ideal for these aspects (esp with built in Grammars and general kitchen sink repartee) and works surprisingly well with most popular LLMs.
1 comments

I honestly think Mojo is the dark horse in this race. That is assuming all the roadmap goals are fulfilled. We're talking about C++-like performance, Python syntax, complete compatibility with Python, designed from the start to interface with AI, compile-time metaprogramming like Zig, and all kinds of other goodies.

So yes, people can bless Go and Rust all they want. Nothing is wrong with the languages, but I agree that learning them for the sake of AI usage is probably not the best idea if one is competent in a language already.

Disclosure: Lattner is one of my programming heroes, so I might be biased.

I really wanted to like Mojo, but the more I read about it, the more it really wasn't Python even though, starting out, that was a major claim to fame.

There is an excellent chance it will be awesome stuff. But they did themselves a huge disservice with the initial claim about trying to be Python compatible.

There is still Python Interop., which will be nice. Even if the syntax is not a one-to-one, it's better than nothing. Though, I do agree "100% compatible syntax" was an overzealous promise.
There's the syntax, of course.

But then there's also the semantics. When something that looks like Python parameter passing actually passes a copy of the argument, it's not really Python at all.

What's even more interesting? disconcerting? is that Mojo has two different ways of defining functions, and the one that most resembles Python already has this change.

I'm all for new languages borrowing the best concepts from previous languages, and distancing themselves from them a bit.

For example, this was discussed here recently: https://github.com/spylang/spy

It has been obvious for a couple of decades that CPython is itself a Schelling point and that anything promising full Python compatibility can't keep up and will eventually die, so (to me) this bold unreachable claim seems like an unforced error on the part of the Mojo team.

> Even if the syntax is not a one-to-one, it's better than nothing.

To some extent this may be true. But back in the day, when I was working on projects where I would use multiple languages throughout the day, the cost of switching between languages actually seemed lower when there was more distance between the languages, so...

> There is still Python Interop., which will be nice.

Interop between Python and not-quite-Python will be valuable, sure, but it would be even nicer if the language had enough good facilities that people didn't need to continually exit it.

Time will tell.