News for hackers. Stuff that matters.
Re:Again on 0-based vs. 1-based indexing by tpush on Wednesday January 20, 2021 @06:57AM (#25845346)
A pointer (or reference, or just 'address') is a general concept that by definition is part of any language featuring mutation.

Any language that makes use of mutation for primitive constructs (not saying that's the case here specifically) needs an understanding of "observing/causing change" pretty early on.

Re:Again on 0-based vs. 1-based indexing by improbable22 on Wednesday January 20, 2021 @07:14AM (#25845503)
> is a general concept that by definition is part of any language featuring mutation.

One counter-example is Mathematica. I can mutate any object any time I like, and doing so is extremely common. Yet under "pointer" its help tells me about some unicode symbols, and some GUI stuff about mouse pointers.

In reality, some of its lists are dense memory like C, some contain arbitrary objects (such as expressions, or high-precision numbers), but these implementation details aren't part of the language, and most users never know them.

Re:Again on 0-based vs. 1-based indexing by tremon on Wednesday January 20, 2021 @07:32AM (#25845664)
Mathematica is also not a low-level programming language. It's math-based, so it deals with abstract concepts, not concrete hardware implementations.

0-based arrays are based on hardware implementations; 1-based arrays are based on abstract collections; you could make the argument that 0-based arrays are a leaky abstraction, but the question then becomes: what abstraction? C explicitly tried not to abstract away the underlying hardware.

Re:Again on 0-based vs. 1-based indexing by improbable22 on Wednesday January 20, 2021 @08:25AM (#25846123)
If "any language" means "any language sufficiently low-level to have C-like pointers", then no contest!

Surely the point of any language at all is to abstract away some details of the underlying hardware. Both for portability and to make things easier for human brains. How much you should abstract away obviously varies, based on what you're trying to do, and on how varied the hardware is.

And it depends on how much computation & memory you can give your compiler. One reason new languages can have nicer abstractions is that they don't have to compile on 1970s hardware.

Re:Again on 0-based vs. 1-based indexing by pjmlp on Wednesday January 20, 2021 @08:59AM (#25846490)
Ada, Pascal, Modula-2,....
Re:Again on 0-based vs. 1-based indexing by wiz21c on Wednesday January 20, 2021 @09:29AM (#25846801)
lisp, smalltalk, scheme, R.
Re:Again on 0-based vs. 1-based indexing by zajio1am on Wednesday January 20, 2021 @12:27PM (#25849134)
0-based arrays/indexes are also based on abstract concepts. 1-based ordinal numbers (in both maths and language) are just tradition from time before 0 was generally accepted. Set theory (as a clean design of math foundations) also starts ordinals at 0.
Re:Again on 0-based vs. 1-based indexing by tpush on Wednesday January 20, 2021 @07:29AM (#25845636)
The specific word or implementation isn't important.

In Mathematica's case (and most other languages, sadly), presumably the concept of 'variable' is overloaded with the semantics of a pointer/reference. Meaning, you cause and observe changes to locations via a variable.