in reply to Why does Perl have typeglobs?
Perl has typeglobs because Perl has sigils. A typeglob would make no sense in a language where you write:
string s; array a; hash h;
But a typeglob makes sense in a language where you can say:
our( $stuff, @stuff, %stuff ); open *stuff, ...; &stuff(); write stuff;
Looking in the symbol table under the single name "stuff", you might find 6 different things. What's an obvious way to implement that?
- tye
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Why does Perl have typeglobs? (sigils)
by LanX (Saint) on Jul 10, 2014 at 00:34 UTC | |
by tye (Sage) on Jul 10, 2014 at 01:13 UTC | |
by LanX (Saint) on Jul 10, 2014 at 22:18 UTC | |
by tye (Sage) on Jul 10, 2014 at 23:12 UTC |