News for hackers. Stuff that matters.
Re:So many bad takes. Learn from the Prime Video microservic... by jcparkyn on Monday May 08, 2023 @12:11AM (#35857997)
Spoken like someone who's never used Matlab :)
Re:So many bad takes. Learn from the Prime Video microservic... by itake on Monday May 08, 2023 @01:51AM (#35858542)
> indexes start at 1

- no one

-- Matlab

Re:So many bad takes. Learn from the Prime Video microservic... by MiyamotoAkira on Monday May 08, 2023 @02:13AM (#35858642)
Pascal had indexes starting at 1 too.

Starting indexes at 0 makes sense when you want to enable the developer to manipulate memory (for example, C)

Indexes starting at 1 matches with a more natural ordinal sequencing.

Re:So many bad takes. Learn from the Prime Video microservic... by haspok on Monday May 08, 2023 @04:26AM (#35859308)
> indexes starting at...

"I don't understand the word 'index'".

- a functional programmer

Re:So many bad takes. Learn from the Prime Video microservic... by selcuka on Monday May 08, 2023 @04:33AM (#35859356)
The most evil was Visual Basic where you could configure the default starting index (OPTION BASE 1), leading to weird bugs when multiple people worked on the same codebase.
Re:So many bad takes. Learn from the Prime Video microservic... by itake on Monday May 08, 2023 @09:21AM (#35861265)
I don’t understand. Either your saying adding or removing elements to an array doesn’t manipulate memory, or you’re saying adding or removing elements in an array does manipulate memory, but the developer doesn’t care due to the GC.

If it’s the second option, why has (almost) every other language chosen with a GC to start arrays with 0?