Stack Exchange
log in
users (8)
rooms (9)
faq
vegai
general
recent
conversations
PHP
Support group for those afflicted with PHP. Don't ask to ask, ...
13
3
vegai
Sep 26, 2016 12:11
@NikiC although... now 1 > null gets a pass :-/
vegai
Sep 26, 2016 11:43
@NikiC yep, that was actually a rather trivial change. I implemented it in my proto and added unit tests for null tests
vegai
Sep 26, 2016 11:36
although... it would still be simple if I'd just make null checks exempt from the type checks
vegai
Sep 26, 2016 11:36
I kinda enjoyed the idea that one setting makes everything strict. Simple idea and simple implementation. But yeah, I can see some problems with that
vegai
Sep 26, 2016 11:35
@NikiC but then the whole simplicity aspect of all this falls away :)
vegai
Sep 26, 2016 11:35
@NikiC perhaps == and != should actually be exempt from the type checking
vegai
Sep 26, 2016 11:34
@NikiC indeed
vegai
Sep 26, 2016 11:28
I kinda think that syntax is pretty much its best feature. Not sure about the others
vegai
Sep 26, 2016 11:27
ruby has horrid syntax? ;)
vegai
Sep 26, 2016 11:16
@Danack So, what do you think? Is this still worth pursuing?
vegai
Sep 26, 2016 11:16
more reason to keep === around, I guess :)
vegai
Sep 26, 2016 11:15
@NikiC true, == null would never work with strict_comparisons
vegai
Sep 26, 2016 09:53
others ideas I had were 1) forbid === altogether and 2) make it do the same typecheck and throw exception
vegai
Sep 26, 2016 09:53
but then == would be actually stronger than ===, which might be confusing
vegai
Sep 26, 2016 09:53
possibly the best option would be to not touch === at all
vegai
Sep 26, 2016 09:52
@DaveRandom That was one point I was having conflicted feelings about (I wrote it in internals already)
vegai
Sep 26, 2016 09:50
@PeeHaa oh, cool! Thanks. Didn't know about that
vegai
Sep 26, 2016 09:49
so totally optional
vegai
Sep 26, 2016 09:49
@DaveRandom it's opt-in, like strict_types
vegai
Sep 26, 2016 09:48
@DaveRandom ditto for < >, switches, and pretty much all comparisons
vegai
Sep 26, 2016 09:48
@DaveRandom it will make == check the types and throw an exception if the types don't match
vegai
Sep 26, 2016 09:48
I'd rather not work on the rfc if there's close to no chance it'll get through
vegai
Sep 26, 2016 09:47
@PeeHaa yeah, I know. That's the other reason I'm here :)
vegai
Sep 26, 2016 09:47
@Danack hi!
vegai
Sep 26, 2016 09:46
the thread is here:
news.php.net/php.internals/96028
vegai
Sep 26, 2016 09:46
so.... do people want that? :)
vegai
Sep 26, 2016 09:45
but I'll gladly try to make it better if people want that
vegai
Sep 26, 2016 09:45
PHP is just one of the many languages I work on, and perhaps the least favourite one
vegai
Sep 26, 2016 09:45
thought I'd pop by here to gauge how people are feeling about it
vegai
Sep 26, 2016 09:45
I already wrote about my wish to write an RFC about it in the internals list
vegai
Sep 26, 2016 09:44
I'm working on a strict_comparisons prototype
vegai
Sep 26, 2016 09:44
Hey