What's The Difference Between Hashmap And Objects - Programming - Nairaland
Nairaland Forum › Science/Technology › Programming › What's The Difference Between Hashmap And Objects (976 Views)
| What's The Difference Between Hashmap And Objects by Tobedated(op): 10:43pm On Nov 09, 2022 |
Currently going through Grokking algorithms and it defines hashmap as key/value pairs but isn't that the same as object are they the same thing or what's the difference between the two |
| Re: What's The Difference Between Hashmap And Objects by chukwuebuka65(m): 11:05pm On Nov 09, 2022 |
Tobedated:Just see objects as a group of variables that are related together with methods to work on them. That’s the foundation of object oriented programming . Hash maps are just like array but with named indexes. I think javascript objects acts like hash maps and also like objects ( in the real sense of objects ie a group of related variables and functions to manipulate them). You can google objects in programming in general to understand more. |
| Re: What's The Difference Between Hashmap And Objects by TastyFriedPussy: 6:56am On Nov 10, 2022 |
You'll later give up and I'll be here waiting for you when that eventually happens rubbish.. |
| Re: What's The Difference Between Hashmap And Objects by etoluw: 7:15am On Nov 10, 2022 |
Tobedated:In OOP objects are not key/value pairs . It is JavaScript that give you that impression. Any key/value pair is a Map. we have different types of Map TreeMap HashMap LinkedHashMap |
| Re: What's The Difference Between Hashmap And Objects by Tobedated(op): 9:42am On Nov 10, 2022 |
chukwuebuka65:thanks that means i still got a lot to learn |
| Re: What's The Difference Between Hashmap And Objects by Tobedated(op): 9:44am On Nov 10, 2022 |
etoluw:oh, okay thanks i still got a lot to learn |
| Re: What's The Difference Between Hashmap And Objects by Deicide: 4:52pm On Nov 10, 2022 |
Well in a HashMap your keys are unique. Except maybe you using a multimap data structure. This is one of the reason we ask people to start with Languages like C++ or Java, this is because this are Strongly and statically typed languages. |
| Re: What's The Difference Between Hashmap And Objects by tosinhtml: 7:23pm On Nov 10, 2022 |
TastyFriedPussy: You need deliverance! |
| Re: What's The Difference Between Hashmap And Objects by tensazangetsu20(m): 7:52pm On Nov 10, 2022 |
Deicide:You can't have double key types in a JavaScript object still. |
| Re: What's The Difference Between Hashmap And Objects by Karleb(m): 8:11pm On Nov 10, 2022 |
tensazangetsu20:It's good to note that javascript has a map object, which works very similar to the hashmaps in Java for example. |
| Re: What's The Difference Between Hashmap And Objects by tensazangetsu20(m): 8:12pm On Nov 10, 2022 |
Karleb:Yeah ES6. Map and Sets |
| Re: What's The Difference Between Hashmap And Objects by 99thEnemy(m): 9:31pm On Nov 10, 2022 |
TastyFriedPussy: ![]() |
| Re: What's The Difference Between Hashmap And Objects by Deicide: 9:52pm On Nov 10, 2022 |
tensazangetsu20:It would complain but allow it |
| Re: What's The Difference Between Hashmap And Objects by tensazangetsu20(m): 9:58pm On Nov 10, 2022 |
Deicide:It won't. It reassigns what you had on the previous key to the present. |
| Re: What's The Difference Between Hashmap And Objects by Deicide: 10:52pm On Nov 10, 2022 |
tensazangetsu20:Hmm but that is not a good Idea it leaves room for error. |
What Are Proxy Objects? And How They Work In Javascript • Difference Between Website Design, Front End And Back End Development • Web Development And Web Design - The Difference • 2 • 3 • 4
Converting Website Into Mobile App • I'm Facing A Challenge Trying To Land IT Support Roles. Please Help � • Google Code Search
rubbish..