# How to design a new data type like Complex

**URL:** <https://discourse.julialang.org/t/how-to-design-a-new-data-type-like-complex/70718>\
**Category:** New to Julia\
**Tags:** question, type\
**Created:** [November 1, 2021, 7:29am UTC](https://discourse.julialang.org/t/how-to-design-a-new-data-type-like-complex/70718 "2021-11-01T07:29:28Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Bardo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bardo/32/21601_2.png) [@Bardo](https://discourse.julialang.org/u/Bardo)\
**Post date:** [November 1, 2021, 4:21pm UTC](https://discourse.julialang.org/t/how-to-design-a-new-data-type-like-complex/70718/4 "2021-11-01T16:21:28Z")

</div>

> [@DNF](#):
>
> `@edit complex(0, 1)`

Yes, thanks, but this throws an error here:

```julia
julia> @edit complex(0, 1)
ERROR: IOError: could not spawn `code -g 'C:\Users\xxx\AppData\Local\Programs\Julia-1.7.0-rc1\share\julia\base\complex.jl:171'`: no such file or directory (ENOENT)
Stacktrace:
  [1] _spawn_primitive(file::String, cmd::Cmd, stdio::Vector{Any})
    @ Base .\process.jl:100
  [2] #690
    @ .\process.jl:113 [inlined]
  [3] setup_stdios(f::Base.var"#690#691"{Cmd}, stdios::Vector{Any})
    @ Base .\process.jl:197
  [4] _spawn
    @ .\process.jl:112 [inlined]
  [5] _spawn(::Base.CmdRedirect, ::Vector{Any})
    @ Base .\process.jl:140
  [6] run(::Base.CmdRedirect; wait::Bool)
    @ Base .\process.jl:449
  [7] (::InteractiveUtils.var"#2#3"{Bool, InteractiveUtils.var"#11#21", Vector{String}})(cmd::Cmd, path::String, line::Int32)
    @ InteractiveUtils C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.7\InteractiveUtils\src\editless.jl:98
  [8] edit(path::String, line::Int32)
    @ InteractiveUtils C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.7\InteractiveUtils\src\editless.jl:205
  [9] edit(f::Any, t::Any)
    @ InteractiveUtils C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.7\InteractiveUtils\src\editless.jl:234
 [10] top-level scope
    @ REPL[57]:1

```

complex.jl exists in

```julia
C:\Users\xxx\AppData\Local\Programs\Julia-1.7.0-rc1\share\julia\test
C:\Users\xxx\AppData\Local\Programs\Julia-1.7.0-rc1\share\julia\base

```

Opened another [thread](https://discourse.julialang.org/t/edit-error-ioerror-could-not-spawn-code-g-c-users/70752).

---

_[View the full topic](https://discourse.julialang.org/t/how-to-design-a-new-data-type-like-complex/70718)._
