Questions tagged [dynamic-typing]
For questions relating to languages whose variables' data types are unknown at compile time but are decided at runtime based on the value currently being held by the variable, and type systems enabling this.
8 questions
21
votes
6
answers
5k
views
Should a language have both null and undefined values?
Javascript for example has both null and undefined values. They are nearly equivalent: both are falsy values that denote absence ...
5
votes
1
answer
292
views
Alternatives to tracing GC for dynamically-typed languages
What are some alternatives to tracing GC for dynamically-typed languages?
I've been interested in dynamically typed languages with predictable behavior since learning about lua in the NetBSD kernel. ...
10
votes
1
answer
712
views
Are there metrics on how often variables in dynamically-typed languages change their type (not "parametrically")
One aspect of a dynamically typed language is that it is possible for a variable to change its type (the "type" of the value it holds) in the course of "straight line code".
This ...
21
votes
4
answers
3k
views
To what extent is type theory relevant to dynamically typed languages?
There seem to be two conflicting views regarding the status of "type systems" used in dynamically typed languages:
That dynamically typed languages are actually just unityped static ...
7
votes
4
answers
467
views
How to avoid output build bloat when wanting to access type metadata information at runtime?
In my answer to the question What are the advantages and disadvantages of making types as a first class value?, I point out that for the language I'm working on, I wanted to have the ability to do ...
8
votes
1
answer
395
views
Why do many dynamically typed languages identify types with strings?
I noticed in JavaScript and Lua, 'types' i.e., those returned by typeof()/type() are just identified by strings. As such we see ...
12
votes
2
answers
548
views
What are the run-time implications of gradual typing?
Statically-typed languages specify the types of variables and functions and reject programs they know won't work before they run. Dynamically-typed languages don't include these annotations or checks, ...
13
votes
5
answers
666
views
Are there any benefits to an Option type in a dynamically-typed language?
Going off of this question about the difference between nullable types and optional types, I notice that no mainstream dynamically typed language has ever gone for an explicitly-boxed ...