Search code examples
javacode-generationparser-generatorcompiler-construction

the possibility of creating a programming language without pointer aliasing


I have a question for all the programming enthusiasts out here. The pointers has always been there in the programming world. Like in C,C++ which has got a explicit pointer support. In java explicit pointer support is not there, but internally the Java system uses pointers. Can there be a scope a programming language to be developed not to have pointer aliasing at all, in practical world?


Solution

  • Stack based languages are turing complete but have no pointers and no memory aliasing.

    A stack-oriented programming language is one that relies on a stack machine model for passing parameters. Several programming languages fit this description, notably Forth, RPL, PostScript, BibTeX style design language

    If your stack based language allows you to interpret a value on the stack as a point on the stack, you could get problems similar to those introduced by pointer aliasing, but that need not be an allowable operation.