3 ms·
What does he mean by this? "The language does have annoyances. The absence of const is a minor one." https://gobyexample.com/constants https://gobyexample.com
by w8rbt 10y ago
What does he mean by this?
"The language does have annoyances. The absence of const is a minor one."
https://gobyexample.com/constants https://gobyexample.com/constants
const s string = "constant"
- peterwaller 10y agoHe's referring to it as a type qualifier, I would assume. https://en.wikipedia.org/wiki/Const_(computer_programming) https://en.wikipedia.org/wiki/Const_(computer_programming)
- w8rbt 10y agoGot it! Thanks for the clarification.
- dllthomas 10y agoI don't think he was complaining about the lack of a syntactic token reading "const", but rather the inability to protect values from modification (in certain contexts) without incurring the overhead of hiding them behind an interface.