News for hackers. Stuff that matters.
Re:Mojo is a much better “Objective-C without the C” than Sw... by Certhas on Monday June 12, 2023 @08:24AM (#36292318)
It looks like the Mojo work in parts grew out of MLIR and Lattner has repeatedly stated that he wants less compiler magic and more control in the hands of the programmer (indeed MLIR, which Clang might also move to [1], is directly exposed in Mojo).

"Faster than C" is a lot more plausible for Mojo than the claim of running arbitrary Python code eventually ;)

[1] https://llvm.github.io/clangir/

Re:Mojo is a much better “Objective-C without the C” than Sw... by pca006132 on Monday June 12, 2023 @08:35AM (#36292422)
> he wants less compiler magic and more control in the hands of the programmer

Indeed, I can see this from their emphasis on generic SIMD, which looks pretty nice. It is nice that there is now a language with first-class SIMD support, comparing with something implemented with a library or autovectorization which may not work.

> "Faster than C" is a lot more plausible for Mojo than the claim of running arbitrary Python code eventually ;)

Seems so. I don't recall reading the claim about running arbitrary Python code, and I think requiring rewriting Python code is reasonable as normal Python code may utilize runtime reflection/dynamic type and they are hard to implement efficiently, and probably require a GC for memory management.

Re:Mojo is a much better “Objective-C without the C” than Sw... by Certhas on Monday June 12, 2023 @11:31AM (#36295221)
> I don't recall reading the claim about running arbitrary Python code

The term superset of Python kind of implies this I think. Beyond the runtime reflection, Python also has eval.... :D

Re:Mojo is a much better “Objective-C without the C” than Sw... by Someone on Monday June 12, 2023 @12:23PM (#36296084)
> It is nice that there is now a language with first-class SIMD support, comparing with something implemented with a library

If the language is flexible enough (in particular, it has to support operator overloading), I don’t see any disadvantages to implementing that in a library.

See for example https://developer.apple.com/documentation/swift/simd