Is a space compact iff it is closed as a subspace of any other space? I am trying to come up with an alternate definition of a compact topological space that coincides with the usual one. Sorry if my topology is a little rusty.
My proposed alternative definition is this. Let's say you have a space $X$. Then for any space $Y$, such that $X$ is a subspace of $Y$, then $X$ is closed in the topology $Y$.
This seems to work. If you take $\mathbb N$, you can take the topology $\mathbb N^*=\mathbb N \cup {\infty}$, and then $\mathbb N$ is not closed in $\mathbb N^*$. On the other hand, $[0, 1]$ contains all its limit points, and should be closed in any topology (where the interval has its regular topology.)
Is this equivalent to the open-cover definition of compact set? Has a similar definition been considered before (probably better than mine)?

No; take the two-point topological space with one open point and one closed point.  The open point is compact, but not closed.
In fact, I don't think that there are any topological spaces which are closed inside every other topological space.
