# Did Modular just reinvent Julia?

**URL:** <https://discourse.julialang.org/t/did-modular-just-reinvent-julia/98214>\
**Category:** Offtopic\
**Tags:** mojo\
**Created:** [May 2, 2023, 5:22pm UTC](https://discourse.julialang.org/t/did-modular-just-reinvent-julia/98214 "2023-05-02T17:22:20Z")\
**Posts on this page:** 20\
**Page:** 11

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [June 8, 2023, 11:23pm UTC](https://discourse.julialang.org/t/did-modular-just-reinvent-julia/98214/206 "2023-06-08T23:23:15Z")

</div>

I don’t know: Python programmers will not have to learn a new language to use Mojo? Looks like two different animals to me…

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [June 9, 2023, 7:11am UTC](https://discourse.julialang.org/t/did-modular-just-reinvent-julia/98214/207 "2023-06-09T07:11:17Z")

</div>

> [@rikh](#):
>
> it does seem to me that there is quite a lot of information about Mojo available

A lot of _claims_ are made about Mojo, but we are (yet) not in a position to verify them, and many of them are conflicting or speculative. Calling these “information” is very charitable.

But of course the lack of specifics (as in “runs your code and you can benchmark it on your desktop” specifics) allows a lot of people to project their dreams and desires into Mojo. This, of course, happens to a certain extent with all new languages.

Color me old-fashioned, but I would have waited for an initial, but usable beta before starting the hype tour. I understand that this is of course not ideal for getting funding.

---

<div class="post-metadata">

**Author:** ![LaurentPlagne](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/laurentplagne/32/10103_2.png) [@LaurentPlagne](https://discourse.julialang.org/u/LaurentPlagne)\
**Post date:** [June 9, 2023, 8:23am UTC](https://discourse.julialang.org/t/did-modular-just-reinvent-julia/98214/208 "2023-06-09T08:23:36Z")

</div>

The Lattner’s short video excerpt is interesting: “Python is a scripting language”, “Python is for glue code”, “Python is easy for beginners”,

Types are a prominent concept in Julia. I need types to reason about my programs. I feel miserable using languages without strong emphasis on type system-\> I feel miserable using Python (and I can’t always avoid to do so).  
I hope that mojo will provide a strong type system (otherwise I will not even consider it).

Julia is here and I am a super happy and productive Julia user for about 4 years now. I have seen numerous posts on discourse where people complain about the language… It is normal to discuss about late trains, but I can’t help wondering why I feel so happy with Julia while some other people seems to suffer so much with it…

I come from large scale Python/C++ projects and It was so painful to deal with the social and technical issues related to the two-language problem. For me Julia provide a 10x SpeedUp in programming leaving so much more space to focus on scientific concerns. Julia is so versatile allowing us to write applications in very different domains (wave simulation, mathematical Optimization, ray-tracing, fluid simulation, transport,…), using CPU and GPUs, with super-charged post-treament capabilities (Makie, DataFrames,…).

So my personal conclusion there is two options:

- Mojo will be very different from Python and superior to Julia (for me) and I may adopt it (and be back into the two-language problems…)
- Mojo will be close to Python (feel natural for average Python programmers) and I will not be the target.

P.S. Just to be clear : I am super happy with Julia but I love to see improvements (my #1 wish would be an easy way to generate .dll/.so callable from my client’s C++ applications).

---

<div class="post-metadata">

**Author:** ![Amval](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/amval/32/6217_2.png) [@Amval](https://discourse.julialang.org/u/Amval)\
**Post date:** [June 9, 2023, 8:51am UTC](https://discourse.julialang.org/t/did-modular-just-reinvent-julia/98214/209 "2023-06-09T08:51:14Z")

</div>

It has already been mentioned on the thread, but after hearing Lattner on that clip, I think is interesting to see the disconnect between:

- Julia being a new language is an obstacle for adoption.
- but adding concepts like **borrow checking** is not an impediment.

I really don’t get it. Who is this hypothetical programmer crippled by slightly unfamiliar syntax but empowered by advanced techniques for memory management?

I feel like we are beating a dead horse with this thread, though 😃 Not sure anything new can be said about this at this point in time.

---

<div class="post-metadata">

**Author:** ![simsurace](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/simsurace/32/30216_2.png) [@simsurace](https://discourse.julialang.org/u/simsurace)\
**Post date:** [June 9, 2023, 12:49pm UTC](https://discourse.julialang.org/t/did-modular-just-reinvent-julia/98214/211 "2023-06-09T12:49:04Z")

</div>

> [@FrancisKing](#):
>
> I bought a book on advanced Python. Comparing that book’s code with mine is night and day.

Do you mind sharing the book title?

---

<div class="post-metadata">

**Author:** ![Bruno\_Amorim](https://avatars.discourse-cdn.com/v4/letter/b/f6c823/32.png) [@Bruno\_Amorim](https://discourse.julialang.org/u/Bruno_Amorim)\
**Post date:** [June 9, 2023, 11:42pm UTC](https://discourse.julialang.org/t/did-modular-just-reinvent-julia/98214/212 "2023-06-09T23:42:26Z")

</div>

Naive question: There are numerous attemps to make python “fast”: pypy, pyston, pydjion, numba, taichi (I am missing something? Maybe I can add to the list cython amd pythran). All of them with somewhat limited success. How is mojo different from any of them? Is it because it is a superset, instead of a subset of Python?

---

<div class="post-metadata">

**Author:** ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Post date:** [June 14, 2023, 7:56am UTC](https://discourse.julialang.org/t/did-modular-just-reinvent-julia/98214/213 "2023-06-14T07:56:13Z")

</div>

I keep thinking of Cython as the main precedent for Mojo. Like Cython, Mojo is actually a new language. It looks like Python, but it is not Python.

I think a new language is actually what is needed. That should not be a surprise. We’re discussing this on the Julia forum.

The other thing it is doing is offering a potentially gradual migration path from CPython. That’s really important because that is where the ecosystem exists.

---

<div class="post-metadata">

**Author:** ![tchebycheff](https://avatars.discourse-cdn.com/v4/letter/t/779978/32.png) [@tchebycheff](https://discourse.julialang.org/u/tchebycheff)\
**Post date:** [June 14, 2023, 10:16am UTC](https://discourse.julialang.org/t/did-modular-just-reinvent-julia/98214/214 "2023-06-14T10:16:28Z")

</div>

Imagine if Julia had adopted Python syntax!

---

<div class="post-metadata">

**Author:** ![DNF](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dnf/32/10191_2.png) [@DNF](https://discourse.julialang.org/u/DNF)\
**Post date:** [June 14, 2023, 11:50am UTC](https://discourse.julialang.org/t/did-modular-just-reinvent-julia/98214/215 "2023-06-14T11:50:36Z")

</div>

What then? Wouldn’t it, at best, have been Mojo then? It would certainly have ruined Julia as a language for me.

---

<div class="post-metadata">

**Author:** ![magister-ludi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/magister-ludi/32/4003_2.png) [@magister-ludi](https://discourse.julialang.org/u/magister-ludi)\
**Post date:** [June 14, 2023, 12:30pm UTC](https://discourse.julialang.org/t/did-modular-just-reinvent-julia/98214/216 "2023-06-14T12:30:54Z")

</div>

> [@tchebycheff](#):
>
> Imagine if Julia had adopted Python syntax!

😬

---

<div class="post-metadata">

**Author:** ![tchebycheff](https://avatars.discourse-cdn.com/v4/letter/t/779978/32.png) [@tchebycheff](https://discourse.julialang.org/u/tchebycheff)\
**Post date:** [June 14, 2023, 2:14pm UTC](https://discourse.julialang.org/t/did-modular-just-reinvent-julia/98214/217 "2023-06-14T14:14:20Z")

</div>

Ruined? How so?  
Is def + colon and 0-indexing so much worse than function + end and 1-indexing?

It would have been epic trolling. Imagine multi-threading and doing ML with “native python”.

---

<div class="post-metadata">

**Author:** ![sswatson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sswatson/32/5135_2.png) [@sswatson](https://discourse.julialang.org/u/sswatson)\
**Post date:** [June 14, 2023, 2:25pm UTC](https://discourse.julialang.org/t/did-modular-just-reinvent-julia/98214/218 "2023-06-14T14:25:02Z")

</div>

That’s the most important question, and I don’t think we have a real answer to it. I’ve been listening to Chris Lattner since the Mojo announcement to figure out what secret sauce they are using to solve the problems that every other make-Python-fast initiative encounters. So far I haven’t seen anything.

I suspect what we’ll end up with will be a bit like Numba but more tailored to the machine-learning use case. Which is to say, Mojo will mostly just execute Python code in the usual way with the CPython interpreter, but with the additional capability of accelerating certain functions that are doing heavily numeric work.

If that turns out to be the case, Mojo may very well come to play an important role in the Python ML ecosystem. But it wouldn’t really be similar to Julia at all.

---

<div class="post-metadata">

**Author:** ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Post date:** [June 14, 2023, 2:38pm UTC](https://discourse.julialang.org/t/did-modular-just-reinvent-julia/98214/219 "2023-06-14T14:38:13Z")

</div>

This would be really bad:

```julia
In [1]: x = [1,2]

In [2]: y = [3,4]

In [3]: x + y
Out[3]: [1, 2, 3, 4]

```

So a good depart from python syntax would be required to support natively array operations with mathematical sense.

(and I think this is the greatest Mojo challenge: can the python syntax be maintained and still the language feel natural for scientific computing? Because if everything boils down to calling libraries with any other syntax, like numpy or Jax, that’s not really different from the alternatives, in terms of compatibility).

---

<div class="post-metadata">

**Author:** ![DNF](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dnf/32/10191_2.png) [@DNF](https://discourse.julialang.org/u/DNF)\
**Post date:** [June 14, 2023, 3:42pm UTC](https://discourse.julialang.org/t/did-modular-just-reinvent-julia/98214/220 "2023-06-14T15:42:49Z")

</div>

There’s a trillion differences, first of all no structs, no type parameters. No `module`, `obj.method()` calling, etc etc.

And, worst of all, no end-delimiters, but whitespace instead🥶

The features and syntax are closely connected.

---

<div class="post-metadata">

**Author:** ![adienes](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adienes/32/37459_2.png) [@adienes](https://discourse.julialang.org/u/adienes)\
**Post date:** [June 14, 2023, 3:57pm UTC](https://discourse.julialang.org/t/did-modular-just-reinvent-julia/98214/221 "2023-06-14T15:57:53Z")

</div>

> [@DNF](#):
>
> but whitespace instead

well, Julia has some whitespace too 😉

---

<div class="post-metadata">

**Author:** ![dlakelan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dlakelan/32/8491_2.png) [@dlakelan](https://discourse.julialang.org/u/dlakelan)\
**Post date:** [June 14, 2023, 3:58pm UTC](https://discourse.julialang.org/t/did-modular-just-reinvent-julia/98214/222 "2023-06-14T15:58:09Z")

</div>

> [@lmiq](#):
>
> So a good depart from python syntax w

No a departure from Python **semantics** would be required. But you could use the syntax to mean vector addition without changing the syntax. Since the original post was imagining trolling python that’s what they meant I think.

---

<div class="post-metadata">

**Author:** ![tchebycheff](https://avatars.discourse-cdn.com/v4/letter/t/779978/32.png) [@tchebycheff](https://discourse.julialang.org/u/tchebycheff)\
**Post date:** [June 15, 2023, 2:01am UTC](https://discourse.julialang.org/t/did-modular-just-reinvent-julia/98214/223 "2023-06-15T02:01:40Z")

</div>

Correct!  
Just like Mojo has its own non-python stuff. A core argument from Mojo against Julia seems to be, “Oh, but people don’t want to learn new syntax.”

---

<div class="post-metadata">

**Author:** ![Sukera](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@Sukera](https://discourse.julialang.org/u/Sukera)\
**Post date:** [June 15, 2023, 5:44am UTC](https://discourse.julialang.org/t/did-modular-just-reinvent-julia/98214/224 "2023-06-15T05:44:05Z")

</div>

I think having the same syntax but different semantics would just be needlessly confusing. You’d always expect it to behave like python, when in fact it does not - having different syntax serves as a VERY good reminder that julia just isn’t python (and thinking of julia or mojo as a “just faster python” is not going to work out well).

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [June 15, 2023, 6:54am UTC](https://discourse.julialang.org/t/did-modular-just-reinvent-julia/98214/225 "2023-06-15T06:54:52Z")

</div>

> [@DNF](#):
>
> The features and syntax are closely connected.

In the sense that using all the features Julia offers in a reasonably compact way requires dedicated syntax to most of them, you are right.

But given the semantics of Julia, a practically infinite range of syntactic variation could map to the exact same language under the hood.

Syntax is something that most people pick up the fastest when learning a new programming language. So changing Julia’s syntax would not make it appreciably easier for newcomers, but at the same time it would impose a huge cost on existing users for no good reason. That’s why it is never going to happen.

Personally I mildly dislike the whitespace-based syntax of Python, but if Python was a great language, it is something I could easily live with, just like I accept the (very few, not necessarily syntactic) quirks of Julia because the great features outweigh them.

Conversely, Python users who imagine that whitespace-based blocks are a key feature of Python are not doing justice to the language. The strengths of Python go much deeper than that.

---

<div class="post-metadata">

**Author:** ![Benny](https://avatars.discourse-cdn.com/v4/letter/b/49beb7/32.png) [@Benny](https://discourse.julialang.org/u/Benny)\
**Post date:** [June 15, 2023, 7:16am UTC](https://discourse.julialang.org/t/did-modular-just-reinvent-julia/98214/226 "2023-06-15T07:16:16Z")

</div>

> [@tchebycheff](#):
>
> A core argument from Mojo against Julia seems to be, “Oh, but people don’t want to learn new syntax.”

I haven’t seen any representative of Mojo make any statement like this. Chris Lattner has had only good things to say about Julia, the community, and their response to Mojo (so he’s seen this sort of chatter). The closest thing he has said to this is that he wants a language that doesn’t require people to relearn syntax, and he wants something for Python programmers. And Mojo indeed is intended to fully allow Python syntax. However, the Mojo docs also introduce new syntax that are critical for performance and technical designs, like borrow-checking and eliding GC. Just different goals and approaches from Julia.

I’m surprised that anybody took this conversation as a “there can be only one” thing, AFAIK people just got heated earlier because people came in belittling opinions and ongoing work on the language. Other than that it was just comparisons and speculation.

[Previous page](https://discourse.julialang.org/t/did-modular-just-reinvent-julia/98214.md?page=10)

[Next page](https://discourse.julialang.org/t/did-modular-just-reinvent-julia/98214.md?page=12)
