Compile-Time Type Safety

The cluster focuses on debates about the value of static, compile-time type checking versus runtime checks in programming languages, highlighting benefits like error prevention and optimization, with references to languages like TypeScript, Java, Haskell, and Zig.

➡️ Stable 0.6x Programming Languages
3,844
Comments
19
Years Active
5
Top Authors
#3792
Topic ID

Activity Over Time

2008
5
2009
23
2010
32
2011
62
2012
77
2013
105
2014
218
2015
187
2016
291
2017
276
2018
243
2019
247
2020
321
2021
371
2022
305
2023
353
2024
320
2025
393
2026
15

Keywords

c.f pypi.org LeftPad dl.acm stackoverflow.com EXIF VersionString MIME BTW MoneyExpr type compile time compile type checking runtime asserts type safety checking checker safety

Sample Comments

di4na Feb 10, 2017 View on HN

what is the usage of your type if you can not check them through the compiler ?

hahn-kev Sep 7, 2025 View on HN

It's almost like you want compile time type safety

xfer Jun 17, 2017 View on HN

You don't need to forsake any of that to get compile-time type checking.

ragnese Oct 26, 2020 View on HN

Only if it's useful compile-time type checking. Unlike Java and C.

pif Sep 20, 2022 View on HN

Type safety at compile time to begin with.

dustingetz Aug 3, 2011 View on HN

static type checking is like compile-time asserts -- it doesn't add to solution complexity, it just verifies assumptions about inherent existing complexity.

gameswithgo Jun 21, 2019 View on HN

A typed language would absolutely fail this at compile time.

JyB Jul 12, 2024 View on HN

Compile-time safety is not achieved which is the point.

alex_duf May 21, 2017 View on HN

except if you want type checking at compilation time

afiori Nov 26, 2021 View on HN

It would be nice if typescript had a option to compile with (obviously limited) runtime checks