MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/pmsjs7/because_arrays_dont_exist/
r/badcode • u/SpeckyYT sadistic • Sep 12 '21
20 comments sorted by
36
Arrays are wanna-be objects
2 u/[deleted] Sep 28 '21 Maps or dictionaries are wanna be objects
2
Maps or dictionaries are wanna be objects
37
Sometimes it is necessary. When the identifier have to be known
5 u/underscorelior1 Sep 13 '21 dictionaries? 5 u/pyker404 Sep 13 '21 Dictionaries (py) or objects (js) are meant to store key-value information where the key is not necessary an string, it can be null, a tuple(in python), a number, a boolean or even an emoji 5 u/xigoi Sep 13 '21 In JavaScript, the key in an object has to be a string. If you want non-string keys, you have to use a Map. 2 u/great_site_not Sep 30 '21 In JavaScript, the key in an object has to be a string.Not since ES6 😉 It can also be a symbol 0 u/underscorelior1 Sep 13 '21 Yea, my main lang is py, but I forgot abt objects :p
5
dictionaries?
5 u/pyker404 Sep 13 '21 Dictionaries (py) or objects (js) are meant to store key-value information where the key is not necessary an string, it can be null, a tuple(in python), a number, a boolean or even an emoji 5 u/xigoi Sep 13 '21 In JavaScript, the key in an object has to be a string. If you want non-string keys, you have to use a Map. 2 u/great_site_not Sep 30 '21 In JavaScript, the key in an object has to be a string.Not since ES6 😉 It can also be a symbol 0 u/underscorelior1 Sep 13 '21 Yea, my main lang is py, but I forgot abt objects :p
Dictionaries (py) or objects (js) are meant to store key-value information where the key is not necessary an string, it can be null, a tuple(in python), a number, a boolean or even an emoji
5 u/xigoi Sep 13 '21 In JavaScript, the key in an object has to be a string. If you want non-string keys, you have to use a Map. 2 u/great_site_not Sep 30 '21 In JavaScript, the key in an object has to be a string.Not since ES6 😉 It can also be a symbol 0 u/underscorelior1 Sep 13 '21 Yea, my main lang is py, but I forgot abt objects :p
In JavaScript, the key in an object has to be a string. If you want non-string keys, you have to use a Map.
2 u/great_site_not Sep 30 '21 In JavaScript, the key in an object has to be a string.Not since ES6 😉 It can also be a symbol
In JavaScript, the key in an object has to be a string.
Not since ES6 😉 It can also be a symbol
0
Yea, my main lang is py, but I forgot abt objects :p
17
Image Transcription: Code
EMOJI_LOADING { 1: '<a:chargement:832732551033651281>', 2: '<a:chargement:832732551033651281>', 3: '<a:chargement:832732551033651281>', 4: '<a:chargement:832732551033651281>', 5: '<a:chargement:832732551033651281>', 6: '<a:chargement:832732551033651281>', 7: '<a:chargement:832732551033651281>', 8: '<a:chargement:832732551033651281>', 9: '<a:chargement:832732551033651281>', 10: '<a:chargement:832732551033651281>' }, SITE: { 1: "cloudim.fr", 2: "panel.cloudim.fr", 3: "no", 4: "cloudim.fr/whmcs/clientarea.php", 5: "no ip visuel" }, }
I'm a human volunteer content transcriber for Reddit and you could be too! If you'd like more information on what we do and why we do it, click here!
12
All of the values are the same... Why
8 u/[deleted] Sep 12 '21 I think there was an animation, but they decided against it
8
I think there was an animation, but they decided against it
11
Dumb people: Arrays don’t exists
Average people: Arrays DO exists!
Smart people: Arrays don’t exists
8 u/yaxamie Sep 12 '21 Arrays are just yeeting your pointer into the void of memory by some defined amount
Arrays are just yeeting your pointer into the void of memory by some defined amount
6
That is clearly zero-indexophobia !
4
Maybe they're just used to lua? /s
But... Someone please tell me I'm seeing this wrong. These are literally all the same right?
Hey GUYS! I just learned about dictionaries!
[deleted] — view deleted comment
6 u/gastonci Sep 12 '21 yes, they are maps not lists 1 u/Abdo_Ghanem Sep 12 '21 The motivation behind Dictionaries.jl is arrays are just dictionaries where the keys are indices. 1 u/Abdo_Ghanem Sep 12 '21 https://youtu.be/Y-hAZcqAw28?t=117
yes, they are maps not lists
1
The motivation behind Dictionaries.jl is arrays are just dictionaries where the keys are indices.
1 u/Abdo_Ghanem Sep 12 '21 https://youtu.be/Y-hAZcqAw28?t=117
https://youtu.be/Y-hAZcqAw28?t=117
36
u/pumpkinplight Sep 12 '21
Arrays are wanna-be objects
37
u/pyker404 Sep 12 '21
Sometimes it is necessary. When the identifier have to be known
17
u/MurdoMaclachlan public boolean isInt(int i) { return true; } Sep 12 '21
Image Transcription: Code
I'm a human volunteer content transcriber for Reddit and you could be too! If you'd like more information on what we do and why we do it, click here!
12
u/[deleted] Sep 12 '21
All of the values are the same... Why
11
u/bugqualia Sep 12 '21
Dumb people: Arrays don’t exists
Average people: Arrays DO exists!
Smart people: Arrays don’t exists
6
u/metalovingien Sep 12 '21
That is clearly zero-indexophobia !
4
u/Xmgplays Sep 12 '21
Maybe they're just used to lua? /s
4
u/[deleted] Sep 12 '21
But... Someone please tell me I'm seeing this wrong. These are literally all the same right?
2
u/AllenKll Sep 13 '21
Hey GUYS! I just learned about dictionaries!
0
u/[deleted] Sep 12 '21
[deleted] — view deleted comment