Nonstandard analysis of A. Robinson is used to give a nonstandard description of the notion of $w$-net introduced by H.J. Wu in [6]. This concept leads to the notion of $Y$-compact space so that $[0,1]$-compact spaces are compact in the usual sence while $R$-compact spaces are E. Hewit's realcompact spaces.