Discussion

Constants in dynamic languages

Javascript's constants are not const Ruby's constants are not const Python needs no "setter function" to achieve something close to constants. Lua needs tables + metatables to achieve it Only PHP seems to get it right Wondering if there is a reason that dynamic languages are struggling on having a mechanism for "real" constants.

Anyone knows if there are deeper reasons or it is just how these languages were designed?

2 points avrmav 8 years ago 1 comments

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton