PO 2013 allows one to "override" predefined procedures and functions
Has anyone noticed that the PO 2013 allows the programmer to “overrride” predefined procedures and functions, e.g., MODULE M; VAR INC: CHAR; i: INTEGER; BEGIN INC := "a”; INC(i) (*not a procedure*) END M. This should not be allowed..
Andreas: what a great feature. It could be really useful in the hands of a creative programmer. I am wondering, what would be the run time behavior of this feature. A crash? How did you find this feature? Would be good to get rid of it. Wojtek ________________________________________ From: Oberon [oberon-bounces@lists.inf.ethz.ch] on behalf of Andreas Pirklbauer [andreas_pirklbauer@yahoo.com] Sent: Friday, May 14, 2021 9:29 AM To: Oberon List Subject: [EXT] [Oberon] PO 2013 allows one to "override" predefined procedures and functions Has anyone noticed that the PO 2013 allows the programmer to “overrride” predefined procedures and functions, e.g., MODULE M; VAR INC: CHAR; i: INTEGER; BEGIN INC := "a”; INC(i) (*not a procedure*) END M. This should not be allowed.. -- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.inf.ethz.ch_mailman_listinfo_oberon&d=DwIGaQ&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=uUiA_zLpwaGJIlq-_BM9w1wVOuyqPwHi3XzJRa-ybV0&m=aquER2B_iMTCPcBNn8atuDabRu9Ug4b-gwKWYBDLcuY&s=iCC8WHsYTs9T-Z3WIsqaiI6kRLCbx6Qv8lCYDfs_Ddk&e=
On Fri, May 14, 2021, at 3:29 PM, Andreas Pirklbauer wrote:
Has anyone noticed that the PO 2013 allows the programmer to “overrride” predefined procedures and functions, e.g.,
MODULE M; VAR INC: CHAR; i: INTEGER; BEGIN INC := "a”; INC(i) (*not a procedure*) END M.
This should not be allowed..
For what I remember in Oberon every predefined identifier can be overridden since always. This is the reason TRUE and FALSE were promoted to keyword in Oberon-07, to avoid CONST TRUE = FALSE. But I agree that this shouldn't be allowed (and that promotion to keyword is debatable). -- Diego Sardina
Gruss, Jörg
Am 14.05.2021 um 16:23 schrieb Diego Sardina <dsar@eml.cc>:
On Fri, May 14, 2021, at 3:29 PM, Andreas Pirklbauer wrote:
Has anyone noticed that the PO 2013 allows the programmer to “overrride” predefined procedures and functions, e.g.,
MODULE M; VAR INC: CHAR; i: INTEGER; BEGIN INC := "a”; INC(i) (*not a procedure*) END M.
This should not be allowed..
For what I remember in Oberon every predefined identifier can be overridden since always.
This is the reason TRUE and FALSE were promoted to keyword in Oberon-07, to avoid CONST TRUE = FALSE.
But I agree that this shouldn't be allowed (and that promotion to keyword is debatable).
-- Diego Sardina -- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
participants (4)
-
Andreas Pirklbauer -
Diego Sardina -
Jörg -
Skulski, Wojciech