Question: Android studio is too heavy and slows down my pc for development. i am an ionic developer and i only need the android emulator to have a better test environment for my mobile application. I only make use of the android studio because i am trying to set up the virtual emulator following the steps in this video [Ionic 3 Tutorial #16 Run app on Android Emulator](https://www.youtube.com/watch?v=ZWrKakQOCYE)

I will like to know if there is another way out to test and run my ionic app either on a real or virtual android emulator. I will like to know if i can run the emulator through my vs code or a lighter IDE

Answer: 
You can use [union types](https://docs.julialang.org/en/v1/manual/types/#Type-Unions) to do the same.

```
function func(x::Union{Int, AbstractFloat})
    x + 1
end

```

Note that C++ `std::variant` is a *tagged union*, so you can always ask "which" variant it is, whereas a Julia union is a proper set union. Pragmatically, that means that in `std::variant<int, int>`, you can distinguish between a "left int" and a "right int", but a `Union{Int, Int}` really is just an `Int`. There's no way to tell which "side" it came from. To emulate the exact tagged union behavior, you'll need to make some custom structs to represent each case.

```
struct LeftInt
    value :: Int
end

struct RightInt
    value :: Int
end

function func(x::Union{LeftInt, RightInt})
    # ... Check whether x is a LeftInt or not ...
end

```

but, in Julia, you often don't need this, and if you do then it's generally smarter to work with generic functions to do your dispatching anyway.
In Julia, you can just write

```
function func(value)
    # something
end

```

and the compiler will then automatically compile for you separate type-specific method of this untyped function whenever you call it with another type.

In Julia, unlike in C++, you usually don't provide a parameter type at all, and you instead let the compiler figure out the types for you. Any parameter types that you provide are just assertions, or help to dispatch to the right method in case you want to provide different implementations for different types yourself.