Because chlorine is MORE electronegative than hydrogen, chlorine in the HClHCl molecule polarizes electron density towards itself. We could represent this as:
""^(+delta)H-Cl^(delta-)+δH−Clδ−.
The H-ClH−Cl molecule is thus a polar covalent molecule, in which the electronegative chlorine atom strongly polarizes electron density. In water, the polarization is so pronounced that the H-ClH−Cl bond completely ionizes:
""^(+delta)H-Cl^(delta-) + H_2O rarr H_3O^+ + Cl^-+δH−Clδ−+H2O→H3O++Cl−.
And thus solutions of HCl(aq)HCl(aq) are stoichiometric in H_3O^+H3O+, "hydronium ion"hydronium ion, and Cl^-Cl−, the chloride ion. In the gas phase, however, we have the H-ClH−Cl molecule, which has a normal boiling point of -85.0−85.0 ""^@C∘C. Sometimes, you will see gas cylinders of HClHCl, the which requires special regulators and special precautions and apparatus to handle. Why so......??
So the moral? As a gas, HClHCl is molecular; as a solution in water, HClHCl ionizes. Gaseous ammonia is the same sort of molecule, however, ammonia acts as a weak base in water.