だけ as "only" vs. だけ as "to the extent"


だけ is frequently presented as meaning "only", "just", "merely", "no more
than", as in:

> 最近は、 **漢字だけ** 勉強している。
>
> Lately, I've _only_ been studying kanji.

But it apparently has a secondary meaning which means _the complete opposite_
(as far as I can tell), as in:

> **あれだけ** 勉強すれば、合格するのも当然です。
>
> If you'll study _to that extent_ , passing is only natural.

Here だけ seems to resemble the meaning of ほど.

**Question:** Is there any theoretical or intuitive explanation as to why 丈
encodes these two opposite meanings, into one? Or perhaps way of translating
だけ that unifies these two meanings, somehow?




Literally 丈 means length/amount/extent. (In measuring clothes, you see lots of
丈)

Adding an ambiguous example to the existing answer might help.

  * これだけ覚えればよいだろう. ('Remembering this amount should be enough')

This can mean either

  * Remembering _this much/as much as this_ should be enough.

if the amount is felt a lot by the speaker; or

  * Remembering _just this/these_ should be enough.

if the amount is felt as something limited by the speaker.




You certainly wouldn't predict that these two meanings would attach to the
same word, but they both seem to mark the boundary beyond which something
ceases to be true. That's pretty abstract, I admit.

What confuses me is this:

好きなだけ食べてください

お前の知ってる日本語って、それだけか？

In the first sentence, だけ seems to be a noun. In the second, it just attaches
to the pronoun それ in a fashion that you would not expect of a noun. So it's
never been clear (to me) what part of speech it should be considered. It's a
strange word, hard to grasp in its entirety.

