Issue #6361 has been updated by MartinBosslet (Martin Bosslet).


nobu (Nobuyoshi Nakada) wrote:
> Then what kind of methods should Blob have?
> 
> And does it need to be built-in?

A real advantage of having it built-in could be
that this gives us the chance to fix #5741 at
the same time. I could imagine that we have two
kinds of "byte array" classes - one, mutable,
that shares COW semantics and all the other 
optimizations with String, but with no notion of
encoding and a yet-to-be-defined interface. 

And then a second class, which is basically the
immutable version of the first one. By sharing 
only a reference we could ensure that the content
would not be proliferated and we could securely
erase its contents after use.
----------------------------------------
Feature #6361: Bitwise string operations
https://bugs.ruby-lang.org/issues/6361#change-26274

Author: MartinBosslet (Martin Bosslet)
Status: Feedback
Priority: Normal
Assignee: 
Category: core
Target version: 


I know this has been discussed a lot in the past (and if there's still 
an open issue for this, I apologize, I couldn't find one), for example
in [1]. While it is generally no problem to implement this on the fly,
I still find that built-in support would be a real improvement. There
are quite some use cases in cryptography where this would come in very
handy, but I'm sure there are lots of other areas, too.

While of course I understand the reasons that were given in the previous
threads that ultimately lead to rejection, I still would like to reopen
the discussion as I felt that in every thread so far the consensus was
that having bitwise string operations would indeed be quite valuable. 

[1] http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/34586


-- 
http://bugs.ruby-lang.org/