Why Is Dynamic Typing So Often Associated with Interpreted Languages?

Interesting question. BTW, I’m the author/maintainer of phc (compiler for PHP), and am doing my PhD on compilers for dynamic languages, so I hope I can offer some insights. I think there is a mistaken assumption here. The authors of PHP, Perl, Python, Ruby, Lua, etc didn’t design “interpreted languages”, they designed dynamic languages, and … Read more

With iTerm2 on Mac, how to delete forward a word from cursor on command-line?

Preferences → Profile → Keys add the following shortcuts: ⌥← Send Escape Sequence Esc+ b ⌥→ Send Escape Sequence Esc+ f ⌘← Send Escape Sequence Esc+ [H ⌘→ Send Escape Sequence Esc+ [F ⌘←Delete Send Hex Code 0x18 0x7f (add bindkey “^X\\x7f” backward-kill-line to .zshrc if you use zShell) ⌥←Delete Send Hex Code 0x1B 0x08 … Read more

Self-reference or forward-reference of type annotations in Python [duplicate]

PEP 0484 – Type Hints – The problem of forward declarations addresses the issue: The problem with type hints is that annotations (per PEP 3107 , and similar to default values) are evaluated at the time a function is defined, and thus any names used in an annotation must be already defined when the function … Read more

TypeScript: Reference subtype of type definition (interface)

You can reference interface subtypes using lookup types, added in TypeScript 2.1: interface ExerciseData { id: number; name: string; vocabulary: Array<{ from: string; to: string; }>; } type Name = ExerciseData[‘name’]; // string These lookup types can also be chained. So to get the type of a vocabulary item you can do this: type Vocabulary … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)