Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

话说第一个答案不严谨 #9

Closed
lexrus opened this issue Aug 24, 2015 · 71 comments
Closed

话说第一个答案不严谨 #9

lexrus opened this issue Aug 24, 2015 · 71 comments

Comments

@lexrus
Copy link

lexrus commented Aug 24, 2015

UserSex 是啥?Sex 是啥?如果想表达性别的话应该改成:

typedef NS_ENUM(NSInteger, CYLUserGender) {
    CYLUserGenderUnknown,
    CYLUserGenderMale,
    CYLUserGenderFemale,
    CYLUserGenderNeuter
};
@liuxuan30
Copy link

CYLUserSexMale也可以的。Sex表达性别并无不妥

@lexrus
Copy link
Author

lexrus commented Aug 24, 2015

如果不是做生殖健康 App,应该还是从社会认知上考虑吧。比如某人生理上是女的,但是祂认为自己是男的,或者某人生理上被阉了,但是祂认为自己是女的。另外不想透露性别,或者勇于承认自己是中性人的情况也要考虑。不然默认成男人也不好。

@zengyun-hacker
Copy link

性别还是用gender比较好吧。。。

@sauchye
Copy link

sauchye commented Aug 24, 2015

gender 比较好~

@ibireme
Copy link

ibireme commented Aug 24, 2015

sex man, sex woman... 蛤蛤蛤

@waniwang
Copy link

waniwang commented Sep 2, 2015

gender+1

@ChenYilong
Copy link
Owner

enter image description here

考虑到用 sex 做性别的开发者还是比较多的,所以就以【 注意 】的形式,告知读者您的这种更严谨的做法了 @lexrus

@dujiepeng
Copy link

深深地震撼了。。。

@dujiepeng
Copy link

还是认为这个应按照需求来做。

@MrXiaofengZhang
Copy link

我也是醉了

@carrotlsp
Copy link

哈哈...想法很棒.

@Nedoloroso
Copy link

我震惊了!!! 爸爸我只想好好敲代码!

@kapop
Copy link

kapop commented Nov 16, 2015

简直吓尿了

@lweisNoN
Copy link

+1...

@ddrccw
Copy link

ddrccw commented Jan 12, 2016

强迫症应该是参考fb的gender设置。。

@SKT-T1-Keyoubi
Copy link

确实更加严谨,虽然平日里都是用sex

@xiaoniu2014
Copy link

+1...

@JonyFang
Copy link

JonyFang commented Feb 8, 2016

选择 gender ...

@pengwj
Copy link

pengwj commented Feb 15, 2016

简直强迫症。

@ghost
Copy link

ghost commented Feb 17, 2016

该面试了,过来看看

@qtdc1229
Copy link

gender 党 + 1

@daiweilai
Copy link

这。。。

@ALVIN-YANG
Copy link

这么来性别种类就太多了, 还有间歇性的呢 : p 不过gender + 1

@devjia
Copy link

devjia commented Feb 29, 2016

@lexrus +1,程序狗就应该这么严谨.

@QiangGGe
Copy link

QiangGGe commented Mar 8, 2016

好严谨好细致

@ghost
Copy link

ghost commented Mar 28, 2016

蛤蛤

@litingyan
Copy link

看完,我方了

@Huang-Libo
Copy link

gender比较严谨,sex偏口语化。

@Liqiankun
Copy link

在21世纪应该可以严禁了

@ChenYilong
Copy link
Owner

苹果的官方用法: 5 pic

@jiangliansong19
Copy link

👍 精益求精,gender + 1

@cuzv
Copy link

cuzv commented Aug 28, 2016

我无知我有理,蛤蛤蛤。

@ghost
Copy link

ghost commented Aug 29, 2016

gender使用起来更加正式吧...
sex... 口语还好

@druidream
Copy link

gender也不是多难的词,为了迁就不认识的程序员而避开这样的词,是智识的倒退。我还是相信一句话:“代码是写给人看的, 顺便能在计算机上运行。”

@huankong
Copy link

微博观光团,打卡。不过还是gender+1

@callmewhy
Copy link

觉得这种严谨是没有任何意义的人真是可悲,估计也觉得首字母是否大写没有意义吧。。。

就像是该用 登录 的场景错用 登陆 一样,自己感觉没必要纠结太多,在其他人看来已经是无知了

@kojmay
Copy link

kojmay commented Sep 13, 2016

哈哈

@martint028
Copy link

gender 棒棒的

@RomanticEncounter
Copy link

哈哈,我也来插一句, CYLUserGenderNeuter 改成CYLUserGenderConfidential 保密应该会比中性要人性的多吧

@ymsmile
Copy link

ymsmile commented Sep 13, 2016

后排~表示都用

@banburytang
Copy link

代码中严谨是好事,世界最终是属于强迫症的。

@yuhanle
Copy link

yuhanle commented Sep 21, 2016

感觉 gender 表达会更舒服一些,严谨点儿好,工作性质必须得严谨

@inkCrazy
Copy link

官方的枚举类型后面为什么要加上数字标记? @lexrus

@feihuang89
Copy link

gender还真没用过,不过代码规范还是很有必要的!

@ZippoLee12138
Copy link

gender👍

@cuiYuhe
Copy link

cuiYuhe commented Mar 29, 2017

想我第一份经过验证的英文简历都是sex.

@BHAreslee
Copy link

关于用sex还是gender,我觉得有点吹毛求疵了

@ghost
Copy link

ghost commented Jun 19, 2017

sex 通用 , gender 规范。 支持 gender

@githhhh
Copy link

githhhh commented Jul 28, 2017

歪了、老铁们

@ZeddShi
Copy link

ZeddShi commented Oct 5, 2017

gender是社会性别有几十种,Facebook的gender option有71种,sex是生理性别只有男 、女 、未知这三种

@mykoma
Copy link

mykoma commented Mar 15, 2018

绝对使用 gender, 程序员绝壁使用 gender

@peanutli
Copy link

用了gender ,顿时感觉逼格都上来了。提高英语水平的好机会。

@liwonder
Copy link

liwonder commented Jun 12, 2018

最政治正确的方式是 Gender at Birth

@xiaohuapunk
Copy link

xiaohuapunk commented Aug 13, 2018

gender 还是 sex ,还有定义几种性别这个应该都需要根据自己产品来考虑吧
gender 口语上,更社会化
sex 生理上的性别,护照上用的就是 sex

@xsailor511
Copy link

你说你们是不是神经病?

@lexrus
Copy link
Author

lexrus commented Oct 15, 2018

三年了,这个水到掉渣的 issue 浪费了这么多人的碎片时间,我真是罪孽深重。各位还是应该把学习重点放在更有意义的 iOS 底层上,不要像我这样乱发散。

祝好。

@lexrus lexrus closed this as completed Oct 15, 2018
@LByy
Copy link

LByy commented Nov 13, 2018

我故意翻到最后看有没有其他的评论的了,没想到楼上的老铁就是当年引起这个issue的楼主啊!!😁😁
还有盖楼的嘛?

@cavanlee
Copy link

Don't underestimate this interview question,this is the question of Hellobike in 2018.

@jzliuhuan
Copy link

一如既往的优秀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests