FAQ

On Friday, March 8, 2013 9:39:43 AM UTC-6, Nate Finch wrote:
On Friday, March 8, 2013 10:26:48 AM UTC-5, Mateusz Czapliński wrote:
On Friday, March 8, 2013 2:44:17 AM UTC+1, Nate Finch wrote:

My question is, what do I name this thing? [...] Suggestions welcome.
a handful quick suggestions follow, then :) everyone likes to paint some
bike shed from time to time :)
If I wasn't talking about what to name it, I'd have to actually write code
for it ;)


bits.Array?
bits.Buffer?
bits.String?
bits.Set? (because "bitset")
bits.Map? (because "bitmap")
also possible - bits.Field (because bitfield)

But I think I've settled on bits.Slice. It really does represent the
actual functionality quite well.

:)
I wrote something like this, just without the Append() and called it Bitmap
because it is a bitmap.

NewBitmap(size int32) *Bitmap
IsSet(ind int32) bool
Get(ind int32) bool
Set(ind int32, x bool)
grow()

What mine does. Set automagically grew it but that might not be the best
idea for every use case.

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 13 of 16 | next ›
Discussion Overview
groupgolang-nuts @
categoriesgo
postedMar 8, '13 at 1:44a
activeMar 10, '13 at 10:25p
posts16
users9
websitegolang.org

People

Translate

site design / logo © 2021 Grokbase