# Keeping the syntax and the need to memorise syntax simple

**URL:** <https://discourse.julialang.org/t/keeping-the-syntax-and-the-need-to-memorise-syntax-simple/44623>\
**Category:** Internals & Design\
**Created:** [August 9, 2020, 3:58pm UTC](https://discourse.julialang.org/t/keeping-the-syntax-and-the-need-to-memorise-syntax-simple/44623 "2020-08-09T15:58:33Z")\
**Posts on this page:** 20\
**Page:** 4

<div class="post-metadata">

**Author:** ![anon37204545](https://avatars.discourse-cdn.com/v4/letter/a/439d5e/32.png) [@anon37204545](https://discourse.julialang.org/u/anon37204545)\
**Post date:** [August 11, 2020, 7:32pm UTC](https://discourse.julialang.org/t/keeping-the-syntax-and-the-need-to-memorise-syntax-simple/44623/62 "2020-08-11T19:32:16Z")

</div>

> [@Nathan\_Boyer](#):
>
> a translation layer that would let you type your preferred syntax

Something like [this new language everyone’s talking about](https://julialang.org/)?

---

<div class="post-metadata">

**Author:** ![dpsanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dpsanders/32/3573_2.png) [@dpsanders](https://discourse.julialang.org/u/dpsanders)\
**Post date:** [August 11, 2020, 7:35pm UTC](https://discourse.julialang.org/t/keeping-the-syntax-and-the-need-to-memorise-syntax-simple/44623/63 "2020-08-11T19:35:14Z")

</div>

You are very welcome to build the tools that you would like to have and make them available so that others in the community can use them if they find them useful.

As an example there is @Amin_Yahyaabadi’s [https://github.com/aminya/juno-plus](https://github.com/aminya/juno-plus)

---

<div class="post-metadata">

**Author:** ![Amin\_Yahyaabadi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/amin_yahyaabadi/32/9826_2.png) [@Amin\_Yahyaabadi](https://discourse.julialang.org/u/Amin_Yahyaabadi)\
**Post date:** [August 11, 2020, 10:48pm UTC](https://discourse.julialang.org/t/keeping-the-syntax-and-the-need-to-memorise-syntax-simple/44623/64 "2020-08-11T22:48:39Z")

</div>

Thanks for mentioning this.

I want to add that everyone is welcome to add code snippets to juno-plus and make a pull request. I will review and merge them. The snippets work in most of the IDEs.  
[https://github.com/aminya/juno-plus/tree/master/snippets](https://github.com/aminya/juno-plus/tree/master/snippets)

---

<div class="post-metadata">

**Author:** ![Zach\_Christensen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/zach_christensen/32/7220_2.png) [@Zach\_Christensen](https://discourse.julialang.org/u/Zach_Christensen)\
**Post date:** [August 12, 2020, 5:22am UTC](https://discourse.julialang.org/t/keeping-the-syntax-and-the-need-to-memorise-syntax-simple/44623/65 "2020-08-12T05:22:13Z")

</div>

Unless your goal is to start a team that is developing an AI driven IDE I think this might be beyond the scope of your OP. It sounds like you have a vision of the kind of syntax you want and I think you could accomplish a lot of this on your own with relative ease. Julia is really good at allowing users to develop their own language within Julia using macros.

You might want to start with something simple, like a macro for better dictionary construction. Once you figure out several pieces you can combine them and have something like

```julia
@syntax_heaven begin

dict3 = dict<string, int>( "a" : 1)

pop(dict3)

end

```

I’m not going to weigh in too much on whether or not any singe idea you’ve presented is good or bad because perhaps what you’ve envisioned as a whole is really neat but when presented abstractly like this is less compelling.

---

<div class="post-metadata">

**Author:** ![Nav](https://avatars.discourse-cdn.com/v4/letter/n/6a8cbe/32.png) [@Nav](https://discourse.julialang.org/u/Nav)\
**Post date:** [August 12, 2020, 5:25am UTC](https://discourse.julialang.org/t/keeping-the-syntax-and-the-need-to-memorise-syntax-simple/44623/66 "2020-08-12T05:25:56Z")

</div>

The request I put up here is not about me. It’s about what a lot of programmers face. You may have seen this video: [Most Popular Programming Languages 1965 - 2019 - YouTube](https://www.youtube.com/watch?v=Og847HVwRSI&feature=youtu.be).  
Yes, I would typically build the plugin. Currently already working on another open source project.  
I guess for a start, Zach’s suggestion of using macro’s would work well.  
The way we do programming is going to change soon. Whether it starts with Julia or some other language or IDE, it’s definitely going to change. It’s not a vision of mine. It’s being envisioned by many others already.

---

<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:** [August 12, 2020, 8:16am UTC](https://discourse.julialang.org/t/keeping-the-syntax-and-the-need-to-memorise-syntax-simple/44623/67 "2020-08-12T08:16:06Z")

</div>

> [@Nav](#):
>
> The way we do programming is going to change soon.

Sure — in a sense it is constantly changing. The way we program is very different from the 1960s, 1980s, or even the 2000s.

But keep in mind that people have been envisioning fundamental, major changes in how we program computers for a long time now. Very few of them happened the way it was predicted/envisioned.

(Incidentally, it would be better not to use the _Internals & Design_ category for this kind of vague and speculative discussion.)

---

<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:** [August 12, 2020, 9:29am UTC](https://discourse.julialang.org/t/keeping-the-syntax-and-the-need-to-memorise-syntax-simple/44623/68 "2020-08-12T09:29:11Z")

</div>

Most of the concerns that you raised relate to keyboard input issues, and I think many of them can be addressed at the editor or IDE level.

There is an Eclipse plugin for Julia:  
[https://marketplace.eclipse.org/content/juliadt](https://marketplace.eclipse.org/content/juliadt)

Frankly, I’ve only used Eclipse or NetBeans in the context of Java.

Recent development for a standard Julia editor/IDE has shifted away from Atom-based Juno to VSCode which has increasing popularity. See this Youtube video:

[![](https://global.discourse-cdn.com/julialang/original/3X/5/d/5d1d0d9e3f876a161365a82b552ce42da05fa57b.jpeg "JuliaCon 2020 | (Juno 1.0) VSCode for Julia 1.0 | Sebastian P., Shuhei K., David A.") ](https://www.youtube.com/watch?v=rQ7D1lXt3GM)

> **[GitHub - julia-vscode/julia-vscode: Julia extension for Visual Studio Code](https://github.com/julia-vscode/julia-vscode)**
>
> Julia extension for Visual Studio Code. Contribute to julia-vscode/julia-vscode development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![NightMachinary](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nightmachinary/32/14196_2.png) [@NightMachinary](https://discourse.julialang.org/u/NightMachinary)\
**Post date:** [August 12, 2020, 2:12pm UTC](https://discourse.julialang.org/t/keeping-the-syntax-and-the-need-to-memorise-syntax-simple/44623/69 "2020-08-12T14:12:50Z")

</div>

Emacs has the visual substitution feature. I found it cool when I first learned about it, but after two hours, reached the conclusion that I liked to see the bare text and not deal with yet another abstraction layer in my mental models.

```nohighlight
  (global-prettify-symbols-mode 1)
  (defun bluerose-prettify-global ()
    (dolist (pretty-symbol
             '(
               ("->" . 8594) ; → 
               ("=>" . 8658) ; ⇒
               (">=" . ?≥)
               ("<=" . ?≤) ;Might be bad with Scala.
               ;; (">=" . (?\s (Br . Bl) ?\s (Bc . Bc) ?≥))
               )) (push pretty-symbol prettify-symbols-alist)))
  (defun bluerose-prettify-lisp ()
    (bluerose-prettify-global)
    (dolist (pretty-symbol
             '(
               ;; ("lambda" . 955) ; λ
               ("reverse" . ?⮌)
               ;; ("->" . (?\s (Br . Bl) ?\s (Bc . Bc) ?🠊))
               ;; ("->>" . (?\s (Br . Bl) ?\s (Br . Bl) ?\s
               ;; (Bc . Br) ?🠊 (Bc . Bl) ?🠊))
               ("->" . (?- (Br . Bc) ?- (Br . Bc) ?>))
               ("->>" . (?\s (Br . Bl) ?\s (Br . Bl) ?\s
                              (Bl . Bl) ?- (Bc . Br) ?- (Bc . Bc) ?>
                              (Bc . Bl) ?- (Br . Br) ?>))
               ;; ("apply" . ?👁) ;Funny
               ("map" . 8614) ; ↦
               )) (push pretty-symbol prettify-symbols-alist)))

  (add-hook 'clojure-mode-hook #'bluerose-prettify-lisp)

```

---

<div class="post-metadata">

**Author:** ![Nav](https://avatars.discourse-cdn.com/v4/letter/n/6a8cbe/32.png) [@Nav](https://discourse.julialang.org/u/Nav)\
**Post date:** [August 12, 2020, 4:17pm UTC](https://discourse.julialang.org/t/keeping-the-syntax-and-the-need-to-memorise-syntax-simple/44623/70 "2020-08-12T16:17:56Z")

</div>

@mkitti: thank you. The mention of Eclipse always reminds me of [Jason Fruit’s](https://www.pythoncentral.io/comparison-of-python-ides-development/) words “_the word “Eclipse” in a programming context (or a literary one, for that matter) fills me with dread; in my mind, Eclipse is a pig strapped to a dog strapped to a whale._” 🙂  
@NightMachinary: That’s cool, but yes, even I’d want to see the actual text. My suggestions were more along the lines of retaining familiar syntax across languages and having a smoother typing flow. Anyway, on a “prettify” note, there’s somebody who actually put symbols into d3.js code (var λ = spherical[0], φ = spherical[1], cosφ = Math.cos(φ);). See the `d3_geo_cartesian` function in [this page](https://d3js.org/d3.v3.js).

---

<div class="post-metadata">

**Author:** ![ftreale](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ftreale/32/17111_2.png) [@ftreale](https://discourse.julialang.org/u/ftreale)\
**Post date:** [August 12, 2020, 6:51pm UTC](https://discourse.julialang.org/t/keeping-the-syntax-and-the-need-to-memorise-syntax-simple/44623/71 "2020-08-12T18:51:31Z")

</div>

Ahaha, I love this community. OP asks to use common parlance syntax, us Julians dream about using another uncommon syntax.

I share the love for (more) mathematical syntax. And I guess this (whole thread) really shows something about the Julian community.

---

<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:** [August 13, 2020, 12:56am UTC](https://discourse.julialang.org/t/keeping-the-syntax-and-the-need-to-memorise-syntax-simple/44623/72 "2020-08-13T00:56:12Z")

</div>

To be clear about the mathematical syntax, unicode is fully accepted in Julia and we have a unicode entry mechanism using LaTeX names and tab completion:

```julia
julia> ϕ = π/6; cos(ϕ)
0.8660254037844387

julia> λ = 3
3

julia> τ = 2π
6.283185307179586

julia> τ/2
3.141592653589793

julia> for color ∈ ["red","blue","green"]
           println(color)
       end
red
blue
green

```

[https://docs.julialang.org/en/v1/manual/unicode-input/](https://docs.julialang.org/en/v1/manual/unicode-input/)

---

<div class="post-metadata">

**Author:** ![Nav](https://avatars.discourse-cdn.com/v4/letter/n/6a8cbe/32.png) [@Nav](https://discourse.julialang.org/u/Nav)\
**Post date:** [August 13, 2020, 3:38am UTC](https://discourse.julialang.org/t/keeping-the-syntax-and-the-need-to-memorise-syntax-simple/44623/73 "2020-08-13T03:38:59Z")

</div>

Thats cool!

---

<div class="post-metadata">

**Author:** ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)\
**Post date:** [August 13, 2020, 1:14pm UTC](https://discourse.julialang.org/t/keeping-the-syntax-and-the-need-to-memorise-syntax-simple/44623/74 "2020-08-13T13:14:31Z")

</div>

PSA written: [PSA: Julia is not at that stage of development anymore](https://discourse.julialang.org/t/psa-julia-is-not-at-that-stage-of-development-anymore/44872)

---

<div class="post-metadata">

**Author:** ![ScottPJones](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/scottpjones/32/146_2.png) [@ScottPJones](https://discourse.julialang.org/u/ScottPJones)\
**Post date:** [August 13, 2020, 7:15pm UTC](https://discourse.julialang.org/t/keeping-the-syntax-and-the-need-to-memorise-syntax-simple/44623/75 "2020-08-13T19:15:19Z")

</div>

I do like being able to use Unicode characters in Julia, however, I fail to see the point of using `∈` instead of `in` in Julia, especially for `for` loops (I think it makes a bit more sense for set operations).

I think everybody understands what `in` means, and how to enter it with their REPL or editor.  
`∈` takes four characters to type even with the Julia REPL instead of 2.  
It takes 3 bytes instead of just 2 in the file.

🤷‍♂️

---

<div class="post-metadata">

**Author:** ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)\
**Post date:** [August 13, 2020, 7:35pm UTC](https://discourse.julialang.org/t/keeping-the-syntax-and-the-need-to-memorise-syntax-simple/44623/76 "2020-08-13T19:35:40Z")

</div>

> [@ScottPJones](#):
>
> I fail to see the point of using `∈` instead of `in` in Julia

In my opinion the major appeal of `∈` over `in` comes when negated. I rarely use it for loops, but I’m rather unconcerned about the extra bytes in the file or the extra characters to type.

---

<div class="post-metadata">

**Author:** ![jeff.bezanson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jeff.bezanson/32/48_2.png) [@jeff.bezanson](https://discourse.julialang.org/u/jeff.bezanson)\
**Post date:** [August 14, 2020, 1:57am UTC](https://discourse.julialang.org/t/keeping-the-syntax-and-the-need-to-memorise-syntax-simple/44623/77 "2020-08-14T01:57:01Z")

</div>

> [@Nav](#):
>
> and for specifying the typing, `dict<string, int>` is so much more accessible on the keyboard, easier to type, readable and looks so much better

I find the notion that angle brackets are objectively better here quite fanciful. This syntax has caused huge problems in languages that use it, e.g. that when you nest it, `>>` conflicts with the right shift operator. And is it really so weird and unconventional to think that maybe `<` means “less than”? It is probably also impossible to implement in a dynamically-typed language, where the compiler doesn’t have any type information at parse time. (Some might mark that as a point against dynamic typing, but I take the opposite conclusion.)

Otherwise, thank you for taking the time to write up your impressions, and I hope you’ll stick around for julia 2.0 when we can entertain more radical ideas — but I also hope you decide that syntax is not where most of the action is 🙂

---

<div class="post-metadata">

**Author:** ![non-Jedi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/non-jedi/32/3645_2.png) [@non-Jedi](https://discourse.julialang.org/u/non-Jedi)\
**Post date:** [August 14, 2020, 3:33am UTC](https://discourse.julialang.org/t/keeping-the-syntax-and-the-need-to-memorise-syntax-simple/44623/78 "2020-08-14T03:33:19Z")

</div>

> [@jeff.bezanson](#):
>
> I hope you’ll stick around for julia 2.0 when we can entertain more radical ideas — but I also hope you decide that syntax is not where most of the action is 🙂

My dream of getting rid of lousy infix notation for sexprs is crushed.

---

<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:** [August 14, 2020, 5:15am UTC](https://discourse.julialang.org/t/keeping-the-syntax-and-the-need-to-memorise-syntax-simple/44623/79 "2020-08-14T05:15:09Z")

</div>

> [@ScottPJones](#):
>
> It takes 3 bytes instead of just 2 in the file.

I don’t have a strong opinion about `in` vs `∈`, but I am not sure that this specifically is a practical concern for most people.

---

<div class="post-metadata">

**Author:** ![Nav](https://avatars.discourse-cdn.com/v4/letter/n/6a8cbe/32.png) [@Nav](https://discourse.julialang.org/u/Nav)\
**Post date:** [August 14, 2020, 5:35am UTC](https://discourse.julialang.org/t/keeping-the-syntax-and-the-need-to-memorise-syntax-simple/44623/80 "2020-08-14T05:35:32Z")

</div>

@Jeff: I agree.  
@Tamas_Papp: That’s true. Unicode problems were addressed on stackexchange: [naming - Is it bad to use Unicode characters in variable names? - Software Engineering Stack Exchange](https://softwareengineering.stackexchange.com/questions/16010/is-it-bad-to-use-unicode-characters-in-variable-names)

---

<div class="post-metadata">

**Author:** ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)\
**Post date:** [August 14, 2020, 1:04pm UTC](https://discourse.julialang.org/t/keeping-the-syntax-and-the-need-to-memorise-syntax-simple/44623/81 "2020-08-14T13:04:53Z")

</div>

People have been using Unicode in Julia successfully for years. In my opinion all the Python answers slamming Unicode there are just post-hoc rationalizations: “Python doesn’t support this properly so it must be better not to use it, right? Right?!?” Julia code based on mathy papers where the notation in code matches the notation is much easier to read and review than code that awkwardly spells out greek names in ASCII. What those SO answers seem to miss is that code doesn’t live in isolation.

[Previous page](https://discourse.julialang.org/t/keeping-the-syntax-and-the-need-to-memorise-syntax-simple/44623.md?page=3)

[Next page](https://discourse.julialang.org/t/keeping-the-syntax-and-the-need-to-memorise-syntax-simple/44623.md?page=5)
