# What is the purpose of \raggedright?

I thought that \raggedright is used to get text: 1) not exceeding certain width, 2) with natural interword spaces, 3) without hyphenation. But it turns out that hyphenation is done with \raggedright. So, what this macro was conceived for? Why was not it defined as \myraggedright, instead of \actualraggedright? (see examples below)

And why is it bad to use \rightskip=0pt plus 1fil in \myraggedright for ragged right effect (as said in the following passage from TeXbook, page 101, second paragraph)? It seems to work flawlessly.

For example, a person can set \rightskip=0pt plus1fil, and every line will be filled with space at the right. But this isn't a particularly good way to make ragged-right margins, because the infinite stretchability will assign zero badness to lines that are very short.

Example 1:

\def\actualraggedright{%
\rightskip=0pt plus 2em
\spaceskip .3333em \xspaceskip .5em\relax
}
\magnification=\magstep5
\actualraggedright
\frenchspacing
\noindent
There are not many different types of question that can be asked on Fourier series so, if you practice,
you should not have any surprises in the exam. In addition to the questions in the mock exam papers
and the blue book, there are many Fourier series questions available in maths text books or on-line.
\bye


Example 2:

\def\myraggedright{%
\rightskip=0pt plus 1fil
\spaceskip .3333em \xspaceskip .5em\relax
}
\magnification=\magstep5
\myraggedright
\frenchspacing
\noindent
There are not many different types of question that can be asked on Fourier series so, if you practice,
you should not have any surprises in the exam. In addition to the questions in the mock exam papers
and the blue book, there are many Fourier series questions available in maths text books or on-line.
\bye

• Usually it is better to allow some hyphenation rather than allow lines with just one letter to be followed by a line that is full, for latex for example the ragged2e package is set up specifically to restrict the rightskip and allow hyphenation in contrast to the latex default \raggedright that does allow arbitrary stretch. – David Carlisle Sep 28 '15 at 9:50

\raggedright is for cases especially narrow text blocks where full justification will not produce a good result.

If you allow arbitrary stretch then you can get very ragged text which can usually be improved by restricting the raggedness.

Compare these two settings of the same text.

\magnification=\magstep5
\noindent X\hrulefill X

\frenchspacing
{\raggedright

\noindent
There are not many different types of question
practice, you\-should\-not\-have\-any\-surprises\-in\-the exam.
In addition to the questions in the mock exam papers
and the blue book, there are many Fourier series
questions available in maths text books or online.

}
\def\myraggedright{%
\rightskip=0pt plus 1fil
\spaceskip .3333em \xspaceskip .5em\relax
}

\bigskip

{\myraggedright
\noindent
There are not many different types of question