# 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:** 5

<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, 1:43pm UTC](https://discourse.julialang.org/t/keeping-the-syntax-and-the-need-to-memorise-syntax-simple/44623/82 "2020-08-14T13:43:04Z")

</div>

> [@Nav](#):
>
> Unicode problems were addressed on stackexchange:

I am not sure what these “problems” are, and how that discussion is relevant here. Apparently at least 95% of the answers are from people who never used a language+IDE with nice native Unicode support, so the “imagine” what it feels like and conclude that they wouldn’t like it.

This is like reading a conversation between people who just heard about bicycles, and reason that the rider must inevitably fall over.

I can kind of relate to the fact that languages conceived before, say, 2000 lack native Unicode support in code. Conversely, for languages designed _after_ 2010 _not_ supporting it is the weird choice — you almost have to make a conscious effort to disallow it.

---

<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:50pm UTC](https://discourse.julialang.org/t/keeping-the-syntax-and-the-need-to-memorise-syntax-simple/44623/83 "2020-08-14T13:50:00Z")

</div>

> [@Tamas\_Papp](#):
>
> This is like reading a conversation between people who just heard about bicycles, and reason that the rider must inevitably fall over.

Yes, this, 100% this 😂 🚳

---

<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 14, 2020, 2:38pm UTC](https://discourse.julialang.org/t/keeping-the-syntax-and-the-need-to-memorise-syntax-simple/44623/84 "2020-08-14T14:38:18Z")

</div>

The only time you’d need it negated is in precisely the case where I did say (for set operations) where it does make more sense to use. `not(a in b)` is rather a pain to read, `a \notin<tab> b` is exactly the same to type (and yes, the file is also a bit smaller!).

My point for `for` loops, etc. is simply why make it harder to understand for most people when it isn’t even shorter/easier to type? What are the pros in that case? I’m afraid some people use it then just because they can, and to seem “cooler”, at the expense of readability and maintainability of the code.

---

<div class="post-metadata">

**Author:** ![Anil\_Joshi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/anil_joshi/32/7869_2.png) [@Anil\_Joshi](https://discourse.julialang.org/u/Anil_Joshi)\
**Post date:** [August 14, 2020, 10:52pm UTC](https://discourse.julialang.org/t/keeping-the-syntax-and-the-need-to-memorise-syntax-simple/44623/85 "2020-08-14T22:52:21Z")

</div>

Thanks for mentioning Emacs. What can be done with an IDE that Emacs can’t do?

---

<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 14, 2020, 11:20pm UTC](https://discourse.julialang.org/t/keeping-the-syntax-and-the-need-to-memorise-syntax-simple/44623/86 "2020-08-14T23:20:30Z")

</div>

> [@Anil\_Joshi](#):
>
> What can be done with an IDE that Emacs can’t do?

I’d trade any “IDE” for [Pluto.jl](https://github.com/fonsp/Pluto.jl) nowadays…

---

<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 14, 2020, 11:23pm UTC](https://discourse.julialang.org/t/keeping-the-syntax-and-the-need-to-memorise-syntax-simple/44623/87 "2020-08-14T23:23:34Z")

</div>

I don’t recommend Emacs for Julia. It’s great for some languages (e.g., Clojure, coq), shines for any language that has no mainstream IDE support (e.g., zsh), and plain-text (org-mode seems unparalleled). But Emacs can’t compete with Julia’s VSCode extension. That extension has superb support: hover documentation, smart goto definitions, profiling (`@profview`), great auto-complete, debugger, … .

If you want to try Emacs, I recommend starting via [doom](https://github.com/hlissner/doom-emacs/).

---

<div class="post-metadata">

**Author:** ![Anil\_Joshi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/anil_joshi/32/7869_2.png) [@Anil\_Joshi](https://discourse.julialang.org/u/Anil_Joshi)\
**Post date:** [August 16, 2020, 6:46pm UTC](https://discourse.julialang.org/t/keeping-the-syntax-and-the-need-to-memorise-syntax-simple/44623/88 "2020-08-16T18:46:09Z")

</div>

Thanks. I will try that.

---

<div class="post-metadata">

**Author:** ![Anil\_Joshi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/anil_joshi/32/7869_2.png) [@Anil\_Joshi](https://discourse.julialang.org/u/Anil_Joshi)\
**Post date:** [August 16, 2020, 6:49pm UTC](https://discourse.julialang.org/t/keeping-the-syntax-and-the-need-to-memorise-syntax-simple/44623/89 "2020-08-16T18:49:15Z")

</div>

VSCode - agh. My shoulders ache and I get an ache in the eye too. But then I program almost exclusively in C with 0.1% Fortran and Bash scripts.

Probably IDEs are better for Object oriented programming where one has to deal with a large number of libraries.

Thanks anyways. I am planning to learn Julia and hence the question. I am most comfortable with Emacs with my key bindings.

---

<div class="post-metadata">

**Author:** ![Mason](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mason/32/2423_2.png) [@Mason](https://discourse.julialang.org/u/Mason)\
**Post date:** [August 16, 2020, 7:29pm UTC](https://discourse.julialang.org/t/keeping-the-syntax-and-the-need-to-memorise-syntax-simple/44623/90 "2020-08-16T19:29:47Z")

</div>

> [@Anil\_Joshi](#):
>
> Thanks for mentioning Emacs. What can be done with an IDE that Emacs can’t do?

If there is something, I haven’t really encountered it yet. I love emacs for julia development and see no reason to change. I mostly use [emacs-jupyter](https://github.com/nnicandro/emacs-jupyter) in org notebooks as essentially a REPL / scratch space with better history support and then I use Revise.jl to hot-reload code in `.jl` files that I’m working on.

If you prefer using julia’s built in REPL, then check out [julia-repl](https://github.com/tpapp/julia-repl).

For things like interactive plots and other fancy graphical things that don’t play nicely with emacs, I just use [Blink.jl](https://github.com/JuliaGizmos/Blink.jl) together with [Interact.jl](https://github.com/JuliaGizmos/Interact.jl) to spawn electron windows where I make little GUIs and put interactive plots.

Long live :emacs:!

---

<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:** [August 16, 2020, 7:40pm UTC](https://discourse.julialang.org/t/keeping-the-syntax-and-the-need-to-memorise-syntax-simple/44623/91 "2020-08-16T19:40:15Z")

</div>

Maybe I need to start looking at emacs-jupyter. The julia-repl is not great for me. Often it sort of leaves droppings around the screen or swallows error messages or things. It’s particularly bad when there are backtraces, which show on the screen but are long enough that when you scroll back… it turns out they first few lines are not there anymore. I’m sure this has something to do with running in a term buffer.

Can I work in emacs-jupyter with julia markdown for Weave files? That’d be cool.

---

<div class="post-metadata">

**Author:** ![Mason](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mason/32/2423_2.png) [@Mason](https://discourse.julialang.org/u/Mason)\
**Post date:** [August 16, 2020, 7:52pm UTC](https://discourse.julialang.org/t/keeping-the-syntax-and-the-need-to-memorise-syntax-simple/44623/92 "2020-08-16T19:52:00Z")

</div>

> [@dlakelan](#):
>
> Can I work in emacs-jupyter with julia markdown for Weave files? That’d be cool.

I haven’t tried, but I suspect that if it doesn’t work out of the box it’d be pretty easy to get working. The basic model is that jupyter-emacs will spawn a jupyter kernel and then offer a few different ways for you to send it code. The two ways I’ve experimented with are via Org notebooks and it’s jupyter-repl, both of which are built in.

Basically, if you’re in an environment that jupyter-emacs isn’t configured to work with, all you should need to do is run `M-x jupyter-repl-associate-buffer` to associate your buffer with a jupyter kernel (it’ll prompt you to spawn one if none are running) and then you can use `M-x jupyter-eval-line-or-region` to have a line or selected region of code be executed in your associated jupyter kernel. By default, I think the output will appear in a `popout` buffer, but I that can be configured.

Org notebooks basically provide a convenient (and multi-lingual / multi-kernel) way to do this out of the box, but it shouldn’t be to hard to replicate for your preferred file-type.

---

<div class="post-metadata">

**Author:** ![Henrique\_Becker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henrique_becker/32/15443_2.png) [@Henrique\_Becker](https://discourse.julialang.org/u/Henrique_Becker)\
**Post date:** [August 16, 2020, 9:06pm UTC](https://discourse.julialang.org/t/keeping-the-syntax-and-the-need-to-memorise-syntax-simple/44623/93 "2020-08-16T21:06:14Z")

</div>

> [@Tamas\_Papp](#):
>
> language+IDE with nice native Unicode support

I use vim ffs, today which IDE has not native Unicode support? What these people are using? A potato?

---

<div class="post-metadata">

**Author:** ![Henrique\_Becker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henrique_becker/32/15443_2.png) [@Henrique\_Becker](https://discourse.julialang.org/u/Henrique_Becker)\
**Post date:** [August 16, 2020, 9:08pm UTC](https://discourse.julialang.org/t/keeping-the-syntax-and-the-need-to-memorise-syntax-simple/44623/94 "2020-08-16T21:08:36Z")

</div>

I like the idea behind `Pluto.jl` but I cannot use it. It seems to solve the “problem” of “hidden state” but my nightmare is jupyter actually re-running my cells each time it finds it a good idea to do so (i.e., what `Pluto.jl` does).

---

<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 16, 2020, 9:23pm UTC](https://discourse.julialang.org/t/keeping-the-syntax-and-the-need-to-memorise-syntax-simple/44623/95 "2020-08-16T21:23:30Z")

</div>

> [@Henrique\_Becker](#):
>
> but my nightmare is jupyter actually re-running my cells each time it finds it a good idea to do so (i.e., what `Pluto.jl` does)

Did you try it with your workflow? I was worried about the same as you are, but Pluto turned out way more useful than I thought.

---

<div class="post-metadata">

**Author:** ![NiclasMattsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/niclasmattsson/32/21988_2.png) [@NiclasMattsson](https://discourse.julialang.org/u/NiclasMattsson)\
**Post date:** [August 17, 2020, 2:22pm UTC](https://discourse.julialang.org/t/keeping-the-syntax-and-the-need-to-memorise-syntax-simple/44623/96 "2020-08-17T14:22:57Z")

</div>

> [@Tamas\_Papp](#):
>
> This is like reading a conversation between people who just heard about bicycles, and reason that the rider must inevitably fall over.

Apologies in advance for going completely off-topic, but you stumbled into my favorite trivia subject: the science of bicycle riding. I’m obsessively compelled to share two potentially mind-blowing factoids. (If someone is tempted to reply, please open a new thread in the off-topic subforum and @call\_me so this thread doesn’t get derailed.)

1. The scientific consensus on exactly how a two-wheeler remains upright is only just beginning to emerge - the knowledge is roughly as new as Julia. Here’s an interesting [summary from Nature Magazine in 2016](https://www.nature.com/news/the-bicycle-problem-that-nearly-broke-mathematics-1.20281).

2. Almost everyone can ride a bike, but even so almost everyone is surprised when they learn this: to turn a bike to the **left** (while remaining upright), you start the turn by rotating the handlebars **clockwise**. This is called countersteering. [Wilbur Wright’s observation](https://en.wikipedia.org/wiki/Countersteering#The_Wright_Brothers) from 100 or so years ago remains true today.

And now back to our usual programming.

---

<div class="post-metadata">

**Author:** ![mbauman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mbauman/32/31082_2.png) [@mbauman](https://discourse.julialang.org/u/mbauman)\
**Post date:** [August 20, 2020, 4:40pm UTC](https://discourse.julialang.org/t/keeping-the-syntax-and-the-need-to-memorise-syntax-simple/44623/97 "2020-08-20T16:40:44Z")

</div>

Split this topic on August 20, 2020, 4:40pm UTC

6 posts were split to a new topic: [Using emacs-jupyter mode for development](https://discourse.julialang.org/t/using-emacs-jupyter-mode-for-development/45276)

---

<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:** [August 24, 2020, 5:12pm UTC](https://discourse.julialang.org/t/keeping-the-syntax-and-the-need-to-memorise-syntax-simple/44623/98 "2020-08-24T17:12:59Z")

</div>

Just to second this point. Reactive notebooks are a great example of something which is a little hard to pitch, in that they turn out to be quite transformative for reasons that require firsthand experience to appreciate.

---

<div class="post-metadata">

**Author:** ![Palli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/palli/32/3380_2.png) [@Palli](https://discourse.julialang.org/u/Palli)\
**Post date:** [August 24, 2020, 5:34pm UTC](https://discourse.julialang.org/t/keeping-the-syntax-and-the-need-to-memorise-syntax-simple/44623/99 "2020-08-24T17:34:19Z")

</div>

> [@Nav](#):
>
> an exclamation mark for `pop !(Array1)` ?

As explained, it’s only a convention, so you CAN not adopt it for your own code (except when calling e.g. pop! but you could wrap it in another function).

I do NOT advice doing that, it’s best to learn and use the convention of a language you use. That said, there are libraries like LispSyntax.jl you might find interesting (and PythonSyntax.jl, but it’s not maintained), I not trying to promote, just show what’s possible. As an exercise you could make your own make your own.

An idea in some languages, at least Nim, is to allow both upper and lower case, you might want the former for readability (for making libraries) but in your own code using such a library allow not exercising the SHIFT key… Someone could propose such for Julia 2.0, I’m just not sure it would be accepted, but you could add that relaxed syntax in a library similar to those above.

> [@anon37204545](#):
>
> > [@Nav](#):
> >
> > I used to absolutely hate the `->` operator in C++.
> 
> Welcome to the club!

FYI: An arrow has been added to Julia. It’s in Julia 1.6 already I think, but if I recall with no defined meaning yet.

---

<div class="post-metadata">

**Author:** ![spaceLem](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/spacelem/32/217628_2.png) [@spaceLem](https://discourse.julialang.org/u/spaceLem)\
**Post date:** [November 18, 2020, 11:05pm UTC](https://discourse.julialang.org/t/keeping-the-syntax-and-the-need-to-memorise-syntax-simple/44623/100 "2020-11-18T23:05:28Z")

</div>

I met Hadley Wickham once and asked him about that! Sadly there were reasons (mostly `%>%` was available to use and it was too much effort to do it in a better way).

Personally I think Julia is easily my favourite language, syntax-wise. There’s very little I don’t like about it (just the lack of underscores in common functions).

---

<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:** [December 3, 2020, 10:14pm UTC](https://discourse.julialang.org/t/keeping-the-syntax-and-the-need-to-memorise-syntax-simple/44623/101 "2020-12-03T22:14:33Z")

</div>

The lack of underscores for many functions, esp. where they are of the form `verbobject` is something that I dislike also. I ended up making a bunch of aliases for the ones for string handling, to make the code more readable (`verb_object` scans a lot better, IMO).  
There are very few things that I dislike about Julia’s syntax, and quite frankly, Julia has been powerful enough for me to come up with pretty easy work arounds (like implementing my own version of string interpolation, based on the `\(...)` syntax that many modern languages use, that also adds formatting.  
It’s hard to think of anything that I disliked, that wasn’t able to be solved because of the power and flexibility of Julia itself (OffsetArrays, PermutedDims, for example).

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

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