# Horns of the dilemma - C++ & Python binding or Julia

**URL:** <https://discourse.julialang.org/t/horns-of-the-dilemma-c-python-binding-or-julia/135886>\
**Category:** Teaching & Outreach\
**Tags:** blog-post\
**Created:** [February 27, 2026, 2:41pm UTC](https://discourse.julialang.org/t/horns-of-the-dilemma-c-python-binding-or-julia/135886 "2026-02-27T14:41:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![som.mukhopadhyay](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/som.mukhopadhyay/32/220997_2.png) [@som.mukhopadhyay](https://discourse.julialang.org/u/som.mukhopadhyay)\
**Post date:** [February 27, 2026, 2:41pm UTC](https://discourse.julialang.org/t/horns-of-the-dilemma-c-python-binding-or-julia/135886/1 "2026-02-27T14:41:06Z")

</div>

Aah… I am at the crossroads - tried-and-true marriage (C++/Python) or solo act (Julia). I am starting new in julia and i must be honest - it looks great for an engineer interested in scientific software.  
i hope i will be a net positive in the group.

 ![Julia or C++AndPython](https://global.discourse-cdn.com/julialang/original/3X/0/1/0102ab7b725dfb79d5192fb56700b54238a76f2f.jpeg)  
As with any object oriented language (like C++/Java/Pyton) i usually start with Design Pattern to understand the big picture and rise above syntax.  
The same thing I have started with Julia, trying to implement a few GoF design pattern in julia. I know that may not be a good start wrt to julia - as it’s not a OO language - but anyway, it helps me to understand the architecture. So… here we go… my first encounter with Julia - a strategy pattern.

```julia
abstract type JourneyToTheAirport end

struct Bus <: JourneyToTheAirport end
struct Metro <: JourneyToTheAirport end
struct Auto <: JourneyToTheAirport end

gotoairport(::Bus) = println("🚌 Journey by bus... hope there's no traffic!")
gotoairport(::Metro) = println("🚇 Journey by metro... fast and efficient.")
gotoairport(::Auto) = println("🛺 Journey by auto... hold on tight!")

# 1. Create a mapping of strings to Type Constructors
choices = Dict(
    "bus" => Bus(),
    "metro" => Metro(),
    "auto" => Auto()
)

function run_app()
    println("How do you want to get to the airport? (bus, metro, auto):")
    
    # 2. Get user input and clean it up (lowercase and strip whitespace)
    user_input = lowercase(strip(readline()))

    # 3. Look up the strategy in our dictionary
    if haskey(choices, user_input)
        strategy = choices[user_input]
        gotoairport(strategy)
    else
        println("❌ Sorry, '$user_input' is not a valid transport option.")
    end
end

run_app()

```

Enjoy
