17 Apr '13, 8pm
@alex_gaynor @jamesgolick I'm sure you've seen this but, if not, I'm so sorry for what I'm about to do:
Issue #5400 has been updated by Joey Zhou. Magnus Holm wrote: > Nobody knows them. Nobody uses them. Let's just get rid of flip-flops, shall we? Well, the flip-flop behavior is useful, so it should not be removed. However, I agree that the syntax is a bit confusing. Flip-flop in Ruby is not so powerful as in Perl (http://perldoc.perl.org/perlop.html#Range-Operators ). It seems like expression leading to true or false, but it cannot be assigned to a variable, and often be treated as a range literal. So maybe we can get rid of the ".." syntax, instead, introduce a class to do the same thing. I've implemented a simple class FlipFlop, which simulates the behavior of flip-flop in Perl. -- begin -- class FlipFlop def initialize(test_right_same_time=false) @bool = false @sequence_num = 0 @same_time = test_right_same_time end def rewind initialize(@same_time) end def test(conditio...