How To Use Dynamic Typing
Print Hello World
Write Basic Syntax
Use Properties
Make An If Else Ladder
Make A Branch Statement
Declare Inits
Use Lists
Use Arrays
Make A Class Hierarchy
Use Nil And Nilable Types
Use Dynamic Typing
Declare Variable Number Of Args
Read And Write Files
Check Inheritance And Implementation
Customize Object Equality
Pass References To Methods
Translate Pseudo Code To Cobra 1
Translate Pseudo Code To Cobra 2
Implement IEnumerable 1
Implement IEnumerable 2
Iterate Through Recursive Data With Yield
Make A Collection Class
Declare Contracts
Win Forms
Access MySQL
Open TK
Cobra supports both static and dynamic typing.

See also:

class Person

    get name as String
        return 'Blaise'

class Car

    get name as String
        return 'Saleen S7'

class Program


        def main
            assert .add(2, 3) == 5
            assert .add('Hi ', 'there.') == 'Hi there.'

        def add(a, b) as dynamic
            return a + b

        def printName(x)
            print  # dynamic binding

class Notes

    def add(a, b) as dynamic
        return a + b
        # + flexible (any type with "+" operator works)
        #   + fast prototyping
        #   + less brittle wrt other software components that change unpredictably
        # + more reusable
        # - errors detected late (run-time)
        # - one error reported at a time (the first one that throws an exception)
        # - slow at run-time
        # - fat at run-time (values must carry type information; boxing)
        # - difficult IDE support
        #   (Intellisense/autosuggestion requires complex analysis and/or execution of code)

    def add(a as decimal, b as decimal) as decimal
        return a + b
        # - inflexible
        #   - slower coding / more typing
        #   - more brittle (to change program to `float` you must find and replace everywhere)
        # - less reusable (cannot use with int and float)
        # + errors detected early (compile-time)
        # + multiple errors reported (every one that the compiler can find)
        # + fast at run-time
        # + slim at run-time (values need only carry data)
        # + easy IDE support (Intellisense/autosuggestion)