Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!us.feeder.erje.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!takemy.news.telefonica.de!telefonica.de!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="ISO-8859-1" Message-ID: <1626786.ztarQMnBzF@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Thu, 08 Nov 2012 21:21:22 +0100 User-Agent: KNode/4.4.11 Content-Transfer-Encoding: 7Bit X-Face: %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&. Followup-To: comp.lang.javascript MIME-Version: 1.0 Lines: 26 NNTP-Posting-Date: 08 Nov 2012 21:21:23 CET NNTP-Posting-Host: 75ced333.newsspool2.arcor-online.net X-Trace: DXC=H2lfC:DK;6nj5k5aEF7ISmA9EHlD;3Ycb4Fo<]lROoRa8kFK`?5BUkRf8dJm^H;T\AHQ\Rj X-Complaints-To: usenet-abuse@arcor.de Xref: csiph.com comp.lang.javascript:17088 Asen Bozhilov wrote: > I have seen different approach to find the unique values in array. > ECMAScript6 will come with Set constructor and this would be easy to > achieve. That would be good. Reference? > The problem is how optimal are the current JS solutions for > unique values. The naive approach would be, to build a hash map when > keys are the values of the array. The problem is that there is no > built-in Map and the keys are always string. This is not applicable > when array contains different types and especially objects. So you need a Map that can have objects as keys. PointedEars -- Prototype.js was written by people who don't know javascript for people who don't know javascript. People who don't know javascript are not the best source of advice on designing systems that use javascript. -- Richard Cornford, cljs,