Erik Engheim
1 min readSep 5, 2022

--

You can autocomplete module to import. Just write “using” and begin writing a module then hit tab. Once you got a module you can use autocomplete on it. Say you want to lookup functions in Dates module, write “Dates.” And hit tab twice to see all possible completions, once to get a specific completion once you start typing. I am talking about the REPL here were I do most coding.

Completion on struct instances work. You get their members. But remember Julia is not OOP, structs don’t have methods. Methods belong to functions. To get all methods on a function foo, write “foo(“.

Remember that Julia is more of a functional language. If you think object and then what can I do with this object then you are stuck in OOP thinking. Think function first, not object. Julia has function and method completion. I think what you are essentially complaining about is that Julia is not an object-oriented language.

Julia completion is made for functional programming. You got to change your mindset to what think in terms of verbs rather than nouns. Think of programming as data transformations rather than as getting objects to do tasks.

If you have object and want to see applicable methods, write " ?(x, y, z) TAB", where x, y, z are the objects you have which you want completion for. Remember Julia methods don't match single objects like in Python, they match multiple.

--

--

Erik Engheim
Erik Engheim

Written by Erik Engheim

Geek dad, living in Oslo, Norway with passion for UX, Julia programming, science, teaching, reading and writing.

Responses (1)