[Oberon] INC(i) vs i := i + 1

Jeff Maggio jmaggio14 at gmail.com
Tue May 4 22:59:42 CEST 2021


Yeah, for our application I want to write very explicit code that's fairly
self-explanatory as part of a tutorial so I chose i := i + 1. Even if they
end up using INC(i) down the road, INC(i) isn't necessarily
self-explanatory for a novice user without assembly experience *(like me
for example)*.

It's a small consideration though - I was mostly curious if they are
compiled differently

best,
Jeff


> My understanding is that if an experienced Python programmer just wanted to increment an integer variable they wouldn't write i = i + 1, instead they would write:
>
>   i += 1
>
> Similarly C++ programmers would write
>
>   i++
>
> INC(i) is the best match in Oberon for either of these statements.
>
> I suspect they would be unhappy if you told them to rewrite this in Python / C++ as
>
>   i = i + 1
>
> so they would see this as a disadvantage if they were told that they had to write it this way in Oberon.
>
> Regards,
> Chris Burrows
> CFB Softwarehttps://www.astrobe.com
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.inf.ethz.ch/pipermail/oberon/attachments/20210504/5a713cdb/attachment.html>


More information about the Oberon mailing list