DEV Community

Diego Novais
Diego Novais

Posted on • Edited on

2 2

Tipagem Forte

Assim como Python, Clojure e Erlang, Ruby também é uma linguagem dinâmica e forte.

O que significa ser uma linguagem forte?

As Linguagens de programação implementadas com tipagem forte, exigem que um valor atribuído para uma variável seja do mesmo tipo em que a variável foi declarada. Deste modo ao executarmos operações entre dados de tipos diferentes será disparado um erro de tipagem.

Exemplo:

age = 34

age.class
--> Integer

name = 'Diego Novais'
name.class
--> String

name + age
--> TypeError (no implicit conversion of Integer into String)
Enter fullscreen mode Exit fullscreen mode

Contato:
Email: contato@diegonovais.com.br
LinkedIn: https://www.linkedin.com/in/diegonovais/
Github: https://github.com/dnovais

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

AWS GenAI LIVE!

GenAI LIVE! is a dynamic live-streamed show exploring how AWS and our partners are helping organizations unlock real value with generative AI.

Tune in to the full event

DEV is partnering to bring live events to the community. Join us or dismiss this billboard if you're not interested. ❤️