Ver Mensaje Individual
  #1  
Antiguo 11-08-2016
Avatar de mamcx
mamcx mamcx is offline
Moderador
 
Registrado: sep 2004
Ubicación: Medellín - Colombia
Posts: 3.918
Reputación: 25
mamcx Tiene un aura espectacularmamcx Tiene un aura espectacularmamcx Tiene un aura espectacular
Sobre tipos dinamicos y estaticos

Siguiendo a: http://clubdelphi.com/foros/showthre...597#post507597 abro este hilo para hablar de tipos estaticos y dinamicos.

----
Un articulo altamente esclarecedor que encontre mientras investigaba sobre creación de lenguajes:

http://blog.steveklabnik.com/posts/2...g-type-systems
Cita:
Much of the time, programmers are trying to solve the same problem with static and dynamic types.
Nevertheless, static types are not limited to problems solved by dynamic types.
Nor are dynamic types limited to problems that can be solved with static types.
At their core, these two techniques are not the same thing at all.
La parte mas importante es el punto donde la diferenciacion entre sistemas de tipos "strong" y "weak" es equivocada, y como ambos estilos NO SON OPUESTOS (osea, perfectamente) sino que se interseccionan entre si y atacan de forma diferente la forma de programar.

Otro aporte ilustrativo:
Cita:
The dichotomy between static and dynamic types is somewhat misleading. Most languages, even when they claim to be dynamically typed, have some static typing features. As far as I'm aware, all languages have some dynamic typing features.

However, most languages can be characterized as choosing one or the other. Why?

Because of the first of the four facts listed above: many of the problems solved by these features overlap, so building in strong versions of both provides little benefit, and significant cost.
----
La idea que impacta mas a los programadores es este hecho:

Cita:
  • Many programmers have used very poor statically typed languages.
  • Many programmers have used dynamically typed languages very poorly.
Osea, la experiencia de muchos programadores es con lenguajes con deficiencias de diseño (relacionadas O NO, con el sistema de tipos) y mezclan sus problemas con que el lenguaje sea de esta o aquella manera.

Es como si uno aprendiera OO a punta de javascript, o C++....

---

El otro punto que me tomo un rato pensarlo es que "han usado lenguajes de tipos estaticos pobres" VS "han usado lenguajes dinamicos pobremente".

Eso es un diferencia que no es tan obvia. La clave es que los lenguajes dinamicos tienen un tipo estatico (otros los llaman UNITIPADOS, o de 1 solo tipo) y se pueden usar "mal", mientras que los problema de lenguajes tipados son debido a que sus sistema de tipos es deficiente o engorroso.
__________________
El malabarista.
Responder Con Cita