[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: OT: Language War (Re: "C" Manual)



"Eric G. Miller" wrote:
...
> > merely a subset of them (0<=i<length).  The problem is that today's
> > programming languages don't provide a mechanism to express this so
> > programmers approximate it with types that describe supersets of the
> > set they want.  (this explains why I dislike java and its type system
> > so much; for C it is acceptable because C excels at the low-level
> > problems it was intended to solve)
> 
> FYI:  There are modern languages where you can define limimited range
> numerical types.  Ada is one such language:
> 
>    type Tri_State is range 0 .. 2;
> 
>    or
> 
>    subtype Tri_State is Integer range 0 .. 2;

  doesn't pascal allow the same type definition?

  and btw you have enum in C (well, it's only for integers and good luck
defining 0 .. 1000000 :-))

	erik



Reply to: