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

A question on modification of a list via a function invocation

On Wednesday, September 6, 2017 at 3:34:41 AM UTC+5:30, Marko Rauhamaa wrote:
> Chris Angelico :
> > That shows that the Java '==' operator is like the Python 'is'
> > operator, and checks for object identity. You haven't manipulated
> > pointers at all. In contrast, here's a C program that actually
> > MANIPULATES pointers:
> >
> > [...]
> >
> > You can't do this with Python, since pointer arithmetic fundamentally
> > doesn't exist. You can in C. Can you in Java?
> You can't do it in Pascal, either, but Pascal definitely has pointers.
> Pointer arithmetics is not an essential part of C. One could argue that
> it was a mistake to include it in the language.

This is subjective of course? but still I wonder where you are coming from?

You of course know that writing Unix was the genesis and raison d'?tre for C right?

And what is an OS but a thin layer of abstraction on top of bare ISP?
ie is not a Linux-OS just an x86 hw + some new ?instructions? called

Which is to say IMHO being able to punch holes into the hi-level-language 
abstraction seems to be a sine qua non for being suitable as a language for writing OSes.
Do you think its reasonable/feasible to do that without easy access to all the 
machine resources eg memory, IO, interrupts etc accessible in the OS-writing language?

[BTW I think Microsoft has done a better job than classic C of repeating this 
with C# ? C# is almost as high-level as python, lisp etc and as low (or lower)
than C; ie it is effectively two languages, called ?safe? and ?unsafe? parts