3 ms·
My assumption had always been that our modern languages had already done that for us, so we don't need to. But you are right, the original statement is absurd.
by adrianratnapala 10y ago
My assumption had always been that our modern languages had already done that for us, so we don't need to.
But you are right, the original statement is absurd. Ada and (at least Turbo-) Pascal have pointers. And so does Java.
- pjmlp 10y agoAlgol, * Pascal, Modula-2, Modula-2+, Modula-3, Oberon, Oberon-2, Active Oberon, Component Pascal, Ada, D, Swift, Rust And I am not listing all of them.
- icebraining 10y agoEven Python, using ctypes.
- pygy_ 10y agoLuaJIT's FFI also allows to manipulate and dereference arbitrary pointers.
- Someone 10y agoI see having pointers to support dynamic memory allocation as something different from the ability to refer to memory addresses. For example, in C, one can [1] write a program that attempts to write data to any memory address. With Java, that is not possible. With pascal, Wirth's intention was similar, but IIRC variant records provided an undesired escape hatch. [1] probably not without invoking implementation-dependent behavior.
- pjmlp 10y agoIn most Pascal dialects (not on the first ISO) var CrtMode: byte absolute $0040:$0049; P: ^byte; begin P := Ptr($40, $49); end