Hacker News new | ask | show | jobs
by ghc 4695 days ago
Whenever I teach a Python workshop I have to make sure to go over this or it leads to confusion for about 20% of people.

But that's for new programmers. Either AngularJS is attracting people very new to programming, or there must be some popular language (not Haskell) where

    a = 10
    b = a
    a = 20
    b == a is True
is still true. What language that is, I don't know.
1 comments

The problem is that the types in Javascript + dependency injected AngularJS services are hidden. If you forget that "auth.loggedIn" is a value-type, you might unconsciously assume it's a reference type. This is one reason I prefer statically-typed languages -- it's much more difficult to make this sort of mistake since the type information is always visible even if you have the most basic IDE.