%%% -*-latex-*-
%%%
%%% Introduction to Sod and its object system
%%%
%%% (c) 2015 Straylight/Edgeware
%%%

%%%----- Licensing notice ---------------------------------------------------
%%%
%%% This file is part of the Sensible Object Design, an object system for C.
%%%
%%% SOD is free software; you can redistribute it and/or modify
%%% it under the terms of the GNU General Public License as published by
%%% the Free Software Foundation; either version 2 of the License, or
%%% (at your option) any later version.
%%%
%%% SOD is distributed in the hope that it will be useful,
%%% but WITHOUT ANY WARRANTY; without even the implied warranty of
%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
%%% GNU General Public License for more details.
%%%
%%% You should have received a copy of the GNU General Public License
%%% along with SOD; if not, write to the Free Software Foundation,
%%% Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

\chapter{Introduction} \label{ch:intro}

Sod is an object system for the C programming language.

The software distribution for Sod contains two main parts:
\begin{itemize}
\item a translator, or preprocessor, similar in spirit to \man{lex}{1} or
  \man{yacc}{1}, which reads input files containing class definitions, and
  writes C source code and header files; and
\item a very small runtime library, containing the built-in base classes and
  some simple utility macros and functions for working with instances and
  classes.
\end{itemize}

%%%--------------------------------------------------------------------------
\section{About Sod's object system} \label{ch:intro.about}

Sod implements a fairly sophisticated object system, with multiple
inheritance, but only single dispatch.

\subsection{Ideology}

Object systems tend to come with ideology attached, so Sod is no exception;
but Sod's ideology is different from that of most object systems.
\begin{itemize}
\item Sod provides an object system, not a module system.  Sod provides no
  facilities for `information hiding'; there is no equivalent to the
  @|private| or @|protected| annotations in Java or \Cplusplus.  The author
  takes the view (a) that such facilities are propertly part of a module
  system, and that trying to abuse classes so that they become modules is a
  mistake; and (b) that much useful functionality is unnecessarily hidden
  away behind abstract interfaces, and a gentle-ish nudge towards greater
  openness is called for.
\item Sod's objective is to provide an effective tool for the expert
  programmer, in the classic `make easy things simple and, difficult things
  possible' mould.  It isn't intended to be useful in an environment
  containing unassisted novice programmers.  Sod tries to avoid placing
  technically unnecessary restrictions on programmers, and is likely to
  evolve in the direction of eliminating existing restrictions rather than
  growing new `safety' features.
\end{itemize}

%%%--------------------------------------------------------------------------
\section{About this manual}

This manual intends to provide complete documentation about Sod.

%%%----- That's all, folks --------------------------------------------------

%%% Local variables:
%%% mode: LaTeX
%%% TeX-master: "sod.tex"
%%% TeX-PDF-mode: t
%%% End:
