Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@illusion466 'snowflake languages' JS, the language of the web, C#, widely used for back end. Am I missing something here?
-
In Java (ughhhhhh java) you can add items to array with a static method from Collections. Or with a loop. Or just use a list
-
@SoulSkrix The end product is a resizable list from which you can delete and to which you can add.
-
devios157057yMeh, call me a snowflake but I'm so through with statically sized arrays. Modern languages like Swift show that you can get close to the performance of static arrays with properly implemented dynamic arrays. I also love how arrays in Swift are value types, but with intelligently deferred copy-on-write. It's one of the cooler features of the language, imo. Means you can safely modify an array while iterating through it, which is pretty friggin sweet.
-
@SoulSkrix lists are not linked lists. Usually they are pre-allocated arrays that are stuck together.
-
snayski977yI'm confused? How are you having so much trouble? Dynamically allocate the array size or use a language that handles the memory for you if it's so hard. 😂
-
repstosd757yI think C# is rather like C++
If you want growable arrays, use ArrayList.
The very first stack overflow result for "dynamic array in c#" shows you how to do this
Jeez, can't kids even Google shit anymore? -
repstosd757y@devios1 all compiled languages have dynamic arrays with continuos memory.
Many of them have COW semantics based data structures.
Welcome to 1998 😂😂 -
rjedlin4517y@illusion466 'Only special snowflake languages have dynamic arrays.' So the majority of languages in common use are special snowflake languages?
Oh, you're saying that reassigning the array makes it not dynamic. While that's true, it still sidesteps the problem OP was having, so the problem is not strictly "How arrays work." -
Ashwink-46yThis is a very important homepage that teaches everyone https://computernamewindows10.com/ how to change username in windows 10 OS.
FUCK STATIC-SIZED ARRAY!!!
FUCK YOU!!!!
FOR MORE THAN 3 HOURS I TRY TO ADD A VALUE TO AN ARRAY
Nothing work...
Nothing...
AAAAAAAAHHHHHHHHHHHHHHHHHHHHHHH!!!!!
undefined