Back to News
Advertisement
Advertisement

⚡ Community Insights

Discussion Sentiment

33% Positive

Analyzed from 265 words in the discussion.

Trending Topics

#typing#dynamic#object#static#code#runtime#problem#types#errors#type

Discussion (13 Comments)Read Original on HackerNews

Panzerschrek•about 3 hours ago
In my programming language I have some sort of "borrowing" too (although it's named differently). But my language has no dynamic typing, only static typing is used and thus all checks are compile-time and have no runtime cost. Why bothering with dynamic typing and paying runtime costs for it?
jamii•about 3 hours ago
> The goal is that most of your code can have the assurances of static typing, but you can still opt in to dynamically-typed glue code to handle repls, live code reloading, runtime code generation, malleable software etc.
Pay08•about 2 hours ago
Dynamic typing is neat, I actually prefer it to static typing. Most people who think they have a problem with dynamic typing actually have a problem with weak typing.
choeger•about 2 hours ago
Dynamic typing is no typing.

The point of types is to prove the absence of errors. Dynamic typing just has these errors well-structured and early, but they're still errors.

Pay08•about 1 hour ago
Errors that you can recover from. I simply appreciate the added flexibility. Have you ever tried making a container of arbitrary types in C++?
teaearlgraycold•about 2 hours ago
Yes to dynamic typing. Yes to static analysis.
Pay08•about 1 hour ago
What?
antonvs•about 2 hours ago
Technically, in a type theory context, there’s no such thing as “dynamic typing”. Types are a static, syntactic property of programs.

The correct term for languages that don’t have syntactic types is “untyped”.

> Most people who think they have a problem with dynamic typing actually have a problem with weak typing.

All people who say things like this have never studied computer science.

_flux•about 1 hour ago
The term unityped is used as well, and at typing level this also makes sense: you have one type called object, you put that object alongside the value object ("tag"), and then at runtime all operations on that object check if its type object provides the operation the code is trying to apply on it (or maybe each value object directly knows the operations it supports). I think I prefer this term.

"syntactic type" is a weird term to me, though. Is that in common use?