Skip to content
This repository was archived by the owner on Apr 24, 2024. It is now read-only.

Latest commit

 

History

History
51 lines (34 loc) · 2.22 KB

differences.md

File metadata and controls

51 lines (34 loc) · 2.22 KB
description
Key differences between Versace, Python, and C++

Differences

{% tabs %} {% tab title="Python" %}

Versace and Python

If you're already a Python developer, Versace should have a gentle learning curve. It is built out of a semi-consistent set of language constructs that should feel familiar and be easy to read and understand.

  • In this example we will be create a program that will print the numbers 1 to 10 (each number is the radius) and calculate the area of a circle for each number.
<figure><img src="../.gitbook/assets/image (3) (1).png" alt=""><figcaption><p>Pue Python code</p></figcaption></figure>

{% endtab %}

{% tab title="Versace" %} The Python code in the pervious tab would correspond to this Versace code.

Pure Versace code with explanation.

{% endtab %}

{% tab title="Versace with Python" %} Most Python code will natively work in Versace with a little modification, for example let's put a python function into the Versace code and see how it reacts. You can import a python file into Versace without any modifications, but if you want to insert python code into a Versace file you will need to use the pyc keyword.

{% hint style="danger" %} You can't use Versace code in Python. {% endhint %}

Versace code with Python code embedded.

{% endtab %}

{% tab title="C++" %}

Versace and C++

If you're already a C++ developer, Versace should have a somewhat steeper learning curve than coming from python, but it is still fairly easy. It is built out of a semi-consistent set of language constructs that should feel familiar and be easy to read and understand.

  • In this example we will be create a program that will print the numbers 1 to 10 (each number is the radius) and calculate the area of a circle for each number.
  • We will be using the same code as the Python example.

{% hint style="danger" %} Versace and C++ are not interoperable. {% endhint %}

Pure C++ code.

{% endtab %} {% endtabs %}