Hi Alexander,

Well, maybe. It's widely used in Java so I've got used to it years ago.
>

Well, I had a wrong assumption that coding standards are there to help with 
code readability and code understanding. Thanks for explaining in great 
detail that they are in fact a means to enshrine personal idiosyncrasies 
and state "we always do it that way, just because".


четверг, 18 апреля 2019 г., 15:54:09 UTC+3 пользователь Alexander Makarov 
написал:
>
> Well, maybe. It's widely used in Java so I've got used to it years ago.
>
> On Thursday, April 18, 2019 at 3:26:30 PM UTC+3, Robert Korulczyk wrote:
>>
>> > As the way to improve the code, it's possible: 
>> > 
>> > switch (true) { 
>> >     case preg_match(Token::REGEX_OPERATOR, $this->code, $match, null, 
>> $this->cursor): 
>> >         $this->pushToken(Token::OPERATOR_TYPE, preg_replace('/\s+/', ' 
>> ', $match[0])); 
>> >     break; 
>> >     case preg_match(self::REGEX_NAME, $this->code, $match, null, 
>> $this->cursor): 
>> >         $this->pushToken(Token::NAME_TYPE, $match[0]); 
>> >     break; 
>> > } 
>> > 
>> > $this->moveCursor($match[0]); 
>>
>> This is not an improvement, you're overusing switch syntax to hide 
>> regular if with dynamic condition - it is closer to obfuscation than 
>> readability 
>> improvement. 
>>
>>
>> Regards, 
>> Robert Korulczyk 
>>
>

-- 
You received this message because you are subscribed to the Google Groups "PHP 
Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to php-fig+unsubscr...@googlegroups.com.
To post to this group, send email to php-fig@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/php-fig/85d33d1a-37ab-4bf9-91a5-9df86b6a8806%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • Re: PSR-12 &q... Woody Gilk
    • Re: PSR-... Alexandru Pătrănescu
      • Re: ... alexey . borzov
        • ... 'Alexander Makarov' via PHP Framework Interoperability Group
          • ... alexey . borzov
            • ... Woody Gilk
              • ... alexey . borzov
              • ... 'Alexander Makarov' via PHP Framework Interoperability Group
              • ... Robert Korulczyk
              • ... 'Alexander Makarov' via PHP Framework Interoperability Group
              • ... alexey . borzov
              • ... 'Alexander Makarov' via PHP Framework Interoperability Group
              • ... Mikko Rantalainen
              • ... Joe T.
              • ... Joe T.
              • ... Josh Bruce
              • ... Ben Ramsey
              • ... Josh Bruce
              • ... Josh Bruce
              • ... alexey . borzov
              • ... Woody Gilk

Reply via email to