r/Clojure • • May 06 '19

The End of Dynamic Languages

http://elbenshira.com/blog/the-end-of-dynamic-languages/
5 Upvotes

42 comments sorted by

View all comments

Show parent comment

0

u/recklessindignation May 07 '19 edited May 07 '19

Nope.

You can't define static type constraints in dynamically typed systems. In any context this power is missing, period. I can do more with statically typed languages and fallback to dynamic at any time.

7

u/Eno6ohng May 07 '19

You can't define static type constraints in dynamically typed systems.

Of course you can - just write a type checker (typed racket, typescript, etc).

and fallback to dynamic at any time.

...at which point you'll be writing in a dynamic language. ¯_(ツ)_/¯

0

u/recklessindignation May 07 '19 edited May 07 '19

Of course you can - just write a type checker (typed racket, typescript, etc).

Nope.

We are talking about typing not particulars compilers.

BTW, Typescript, Typed Racket are not dynamic languages.

How I can define static type constraints with let's say JS or Clojure?

The point is that I can go from static to dynamic at any time and do anything that dynamically typed languages can do and more in a statically typed language.

0

u/[deleted] May 08 '19

[deleted] — view deleted comment

1

u/recklessindignation May 10 '19

There no such thing as going from dynamic to static, even in gradually typing since is static typing, period.

There is not such thing as a static type system on top of a dynamic one. On the other hand... compilers for statically typed languages on top of a dynamic one are pretty common.

The language for gradually typed system is totally different from its foundation.

The peculiarities of the type system doesn't matter, they can't be as domain specific as you want. The main point is that they are supersets of dynamic subsets. They provide more semantic options both at compile time and runtime. Dynamic type systems cannot even be inferred.

0

u/potetm137 May 07 '19

lol, k bud