If $X$ is compact metric then $B(X)$ is non-separabale I've seen the following argument:
Let $X$ be a compact metric space, then denote by $B(X)$ the set of bounded, measurable functions on $X$. $B(X)$ with the sup-norm is a $C^*$-algebra. Then, $B(X)$ is not separable.
Now, if I take $X=[0,1]$, and denote $A=span_{\mathbb{Q}}  \{\chi_{(a,b)} \forall a,b\in \mathbb{Q}\}$ then $A$ is a countable set in $B(X)$ and I had the (wrong) feeling that $A$ is dense in $B(X)$.
Because any measurable bounded function can be approximated uniformly by simple functions.I also didn't use the compactness of $X$. 
So, why am I wrong and I'll be happy to see a proof for non-separability of $B(X)$.
 Thank you in advance.
 A: To show that a space $U$ is not separable, it's  enough to show an uncountable subset $S \subset U$ such that there is $\epsilon > 0$ such that distance between any two points from $S$ is at least $\epsilon$ (why is it enough?).
Consider functions $f_t: [0, 1] \to \mathbb{R}$, $f_t = \chi_{[0, t]}$. Then for $t \ne t'$, $\sup ||f_t - f_{t'}|| = 1$. Therefore, $B([0,1])$ with supremum norm is nonseparable.
The problem with you approach stems from the fact simple functions can approximate any measurable bounded function in 1-norm (integral norm), but not in $\infty$-norm (supremum norm).
A: This is false as stated. For example, $X$ could be finite, in which case $B(X)$ may as well be some $\mathbb R ^n.$
Assume $X$ is infinite. Then it contains a countably infinite subset $\{x_1,x_2,\dots\}.$ Note that singletons are closed, hence Borel, hence all countable subsets of $X$ are Borel sets. Define a map $F$ from the power set $P(\mathbb N)$ into $B(X)$ by setting $F(A) = \chi_{\{x_k : k \in A\}}.$ Then each $F(A)\in B(X).$ Note that if $A_1\ne A_2,$ then $\|F(A_1) - F(A_2)\|_\infty = 1.$ Since $P(\mathbb N)$ is uncountable, we have found uncountably many elements of $B(X)$ whose distances from one another are all $1.$ It follows that $B(X)$ is nonseparable.
I don't think this problem has too much to do with compactness.
A: If  $X$  is compact metric space  such that there exists a countable partition $(X_k)_{K \in N}$ of $X$  into non-emtly measurable subsets of $X$. Then $B(X)$ is non-separabale  w.r.t. sup-norm.  Indeed consider the family of measurable functions $(f_J)_{J \subseteq N}$  where $f_J$ is an indicator  function of $\cup_{k \in J}X_k$ for each $J \subseteq N$. then $\sup_{x \in X}|f_{J_1}(x)-f_{J_2}(x)|=1$ for each different $J_1,J_2 \subseteq N$. This means that $B(X)$ is non-separable.    
