Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Wikipedia: Wikitech

Re: [MediaWiki-CVS] SVN: [34826] trunk/phase3/includes

 

 

Wikipedia wikitech RSS feed   Index | Next | Previous | View Threaded


greg at endpoint

May 14, 2008, 5:42 PM

Post #1 of 4 (186 views)
Permalink
Re: [MediaWiki-CVS] SVN: [34826] trunk/phase3/includes

> * Move $var ? true : false check to boolval function
...
> +
> +function boolval( $val ) {
> + return $val ? true : false;
> +}

What's the point of this function? Should we start creating things like
function equalto( $val1, $val2 ) as well? :)

--
Greg Sabino Mullane greg[at]endpoint.com
Attachments: signature.asc (0.16 KB)


Simetrical+wikilist at gmail

May 14, 2008, 5:46 PM

Post #2 of 4 (176 views)
Permalink
Re: [MediaWiki-CVS] SVN: [34826] trunk/phase3/includes [In reply to]

On Wed, May 14, 2008 at 8:42 PM, Greg Sabino Mullane <greg[at]endpoint.com> wrote:
>
>> * Move $var ? true : false check to boolval function
> ...
>> +
>> +function boolval( $val ) {
>> + return $val ? true : false;
>> +}
>
> What's the point of this function? Should we start creating things like
> function equalto( $val1, $val2 ) as well? :)

Whoa, I didn't see that. WTF?

_______________________________________________
Wikitech-l mailing list
Wikitech-l[at]lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


tstarling at wikimedia

May 14, 2008, 11:25 PM

Post #3 of 4 (173 views)
Permalink
Re: [MediaWiki-CVS] SVN: [34826] trunk/phase3/includes [In reply to]

Greg Sabino Mullane wrote:
>> * Move $var ? true : false check to boolval function
> ...
>> +
>> +function boolval( $val ) {
>> + return $val ? true : false;
>> +}
>
> What's the point of this function? Should we start creating things like
> function equalto( $val1, $val2 ) as well? :)

Perhaps Vasilev was put off by the verbose syntax "$val ? true : false".
The same behaviour can be obtained with "(bool)$val" or "!!$val", which
are both briefer and faster than either of his versions.

-- Tim Starling


_______________________________________________
Wikitech-l mailing list
Wikitech-l[at]lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l


brion at wikimedia

May 15, 2008, 8:39 AM

Post #4 of 4 (168 views)
Permalink
Re: [MediaWiki-CVS] SVN: [34826] trunk/phase3/includes [In reply to]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Greg Sabino Mullane wrote:
>> * Move $var ? true : false check to boolval function
> ...
>> +
>> +function boolval( $val ) {
>> + return $val ? true : false;
>> +}
>
> What's the point of this function? Should we start creating things like
> function equalto( $val1, $val2 ) as well? :)

Yeah, we killed that one. :)

- -- brion
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkgsWRwACgkQwRnhpk1wk466zwCgyzNhKEBehzA8xbKVRlVszHZL
3i4AoNKVkCQ2L9ga2rFkkjFa90B9JYpy
=3/hI
-----END PGP SIGNATURE-----

_______________________________________________
Wikitech-l mailing list
Wikitech-l[at]lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Wikipedia wikitech RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.