Re: Why Pascal?



Mmmmm! I've been lurking on this thread for a wee while reading
various points of view pro/anti this that or the other language.

First of all may I propose that all programming is an attempt to model
(some part of) something in the real world - the traffic light example, for
instance.

If you read back through the thread you will see that the word
'coding' has appeared several times. This is what the programming model
does - encodes things.

May I refer you back before Niklaus Wirth to George Boole - who wrote
in Proposition 1 of Chapter 4 of his book -

All logical propositions may be considered as belonging to one or
other of two great classes, to which the respective names of 'Primary' or
'Concrete Propositions' and 'Secondary' or 'Abstract Propositions' may be
given.

Primary things are those whch we cannot alter in our model - the
actual colours of traffic lights for example are determined by the
lcd/glass manufacturer (and perhaps the current weather) - we can only give
them names (denotations if we want to talk about formal modelling!) for use
in our model.

Secondary things are those which our model can manipulate - evincing
whatever behaviour we wish in terms of primary behaviours defined for more
primitive types.

In Pascal (as others have said) we can call traffic light colours by
name - but it makes absolutely no sense at all to 'give them a value
(numeric or not)'. They are just names of colours.

In low level languages like C or C++ one has to actually specify a
particular encoding - and then be manically careful not to do the wrong
kind of thing by adding red and green and pretending to produce 'yellow'.

Good programmers should always use a type-safe language - one in which
you cannot add red and green - because there is no such operation
available.

I rest my case!

Keith

--
Inspired!
.



Relevant Pages

  • Re: object system...
    ... for that you need machine language. ... isn't even as fast as other systems programming languages. ... Stroustrup's stated design goal was to enable ... all manner of elegance or abstraction can be sacrificed for speed, ...
    (comp.object)
  • Re: DirectX in HLA
    ... I guess that you have a great knowledge of DirectX ... > understanding by looking at them in assembly language... ... > actually represents, really, is a means to "undo" the OOP so ... > is NOT an "OOPL" (object-orientated programming language), ...
    (comp.lang.asm.x86)
  • Re: DirectX in HLA
    ... I guess that you have a great knowledge of DirectX ... > understanding by looking at them in assembly language... ... > actually represents, really, is a means to "undo" the OOP so ... > is NOT an "OOPL" (object-orientated programming language), ...
    (alt.lang.asm)
  • Re: LSP and subtype
    ... What is the class of problems solvable using UML? ... the language of physics cannot describe. ... whatever paradigm equivalent to 2GL/3GL ... there is still a great need for reuse and generic programming. ...
    (comp.object)
  • Re: Why C Is Not My Favourite Programming Language
    ... If you decide afterall that C programming is just not your thing you ... > C has no string type. ... > compiler take care of the rest. ... Why does any normal language ...
    (comp.lang.c)

Loading