由买买提看人间百态

topics

全部话题 - 话题: erasure
1 2 下页 末页 (共2页)
c******n
发帖数: 4965
1
来自主题: Java版 - type erasure weird problem
the following code compiles fine under commandline
but it fails in eclipse, with error msg:
....having the same erasure ......
I checked the .class bytecode , it is exactly the same for the 2
methods (except for return and exception), caller code is able to pick
up the differences because javac actually did add annotation about the
generics parameter, so "erasure" is a lie!!!!!
import java.util.Map;
class ffff{
private static Integer fun(Map s) throws Exception {
return null;}
p... 阅读全帖
s******n
发帖数: 876
2
来自主题: Java版 - It's a Java Bug
apparently the spec has changed since then.
in the current spec, the relevant section is 8.4.2
http://java.sun.com/docs/books/jls/third_edition/html/classes.h
which has a weaker restriction on when m1 and m2 cannot
be declared in the same class:
# m2 has the same signature as m1, or
# the signature of m1 is the same as the erasure of the signature of m2.
List and List are different, and neither is
the same as the erasure of another, i.e. List is
not the same as the erasu... 阅读全帖
s******y
发帖数: 28562
3
来自主题: Biology版 - 痛苦记忆可删除
http://www.sciencemag.org/cgi/content/abstract/science.1195298
Published Online October 28, 2010
Science DOI: 10.1126/science.1195298

Science Express Index
Reports
Calcium-Permeable AMPA Receptor Dynamics Mediate Fear Memory Erasure
Roger L. Clem and Richard L. Huganir*
Traumatic fear memories can be inhibited by behavioral therapy or extinction
training in rodent models, but are prone to relapse. Under some conditions,
however, these treatments generate a permanent effect on behavior
sugges... 阅读全帖
g*****g
发帖数: 34805
4
来自主题: Programming版 - 其实微软是个做语言的公司
你丫不懂就别死撑,type erasure的做法是为了bytecode级别上的forward-compatible
. 指定run time是最小儿科的做法了。
C#那破东西,出了微软自己那俩破类库兼容性垃圾得一塌糊涂,开源社区这么不给力这
就是很大原因。
几个傻逼软毛成天拿个type erasure说事,我老人家ecosystem都说了快10年了,C#被
甩了3条街,SL死了,WP也差不多了。还type erasure呢?
i*****y
发帖数: 3449
5
男与男、女与女,为甚么会有同性恋,科学上迄今仍是谜。但有美国科学家最新以「表
观遗传学」(epigenetics)解释同性恋原因。表观遗传学主要研究环境如何改变基因
表现(gene expression),据指出,当胚胎在母体发育初期,能影响基因表现的「外
延标记」(epi-marks),会向与性别相关的基因发出指令,保护胎儿免受环境影响,
像避免胎儿免受过多睾丸素影响,这足以影响胎儿生殖器官发展、性取向和性别认同。
一般而言,外延标记不会遗传下一代,否则会以父传女、母传子的方式遗传下来,
令女儿较男性化、儿子较女性化,特别强势的外延标记就会导致同性恋倾向。但这理论
仍须研究确定。
http://www.sciencedaily.com/releases/2012/12/121211083212.htm
Epigenetics May Be a Critical Factor Contributing to Homosexuality, Study
Suggests
Dec. 11, 2012 — Epigenetics -- how gene expression is regula... 阅读全帖
p****s
发帖数: 3184
6
Exactly.
无线通信里面,自然噪声导致的erasure是好对付的,人工导致的erasure就是邪恶的,
我想让你崩溃你就得崩溃。
T*****e
发帖数: 47
7
来自主题: LeisureTime版 - My
http://www.youtube.com/watch?v=M1ieWRclcfs
My diplomacy, my security, my hope and my ice-cream,
My tomorrow and my temperature, my lips and my selfishness,
My cigarette, my uncertainty, my penetration,
My notebook and my limit, my importance and my glycerine,
My customer, my function, my lawlessness, my charm,
My hunger, my refusal, my tissue and my vodka,
My omission, my ability, my telephone and my parlour,
My relaxing, my distress, my bedroom, my cassette,
My diction and my pulse, my fortune ... 阅读全帖
c**i
发帖数: 6973
8
I am an libertarian. The short answer is as long as you are in the public
space (eg, roadsides), you are all right.
* libertarian (n): "a person who upholds the principles of individual
liberty especially of thought and action"
www.m-w.com
(1) If you are in a private place, you are subject to rules and regulations
of the owner. A day in mid-1990s, I was at Harvard-Yenching Library. Two
Taiwanese reporters arrived and requested to take a few photos inside the
library. A librarian (white, middle-a... 阅读全帖
N********n
发帖数: 8363
9
来自主题: Programming版 - 《C# 5.0 核心技术》第5版[PDF]

人家原文里说微软CAMBRIDGE中心从98年开始经过不懈的努力终于在04年
人力、财力不足的情况下仍然赶上工期把完善的GENERIC引入到C# 2.0。
原文特别指出正是因为他们的努力C#才避免象JAVA那样采用ERASURE这种
半吊子技术。
人家微软CAMBRIDGE中心讲述C#自力更生的过程,压根没你JAVA屁事。结
果让你杜撰了一圈变成微软抄JAVA的GENERIC。谁没事干了抄JAVA不伦不
类的ERASURE啊。你丫搂着门柱自慰的水平真是绝品。
g*****g
发帖数: 34805
10
来自主题: Programming版 - 其实微软是个做语言的公司
是不重要,语言这点小细节跟ecosystem比就是蚍蜉撼大树。可惜软毛们成天type
erasure,type erasure。跟苍蝇似的,C#都快进垃圾堆了,还不懂得看big picture。
j*******l
发帖数: 1066
11
来自主题: Programming版 - 其实吧,C#是最好的语言。。。
"java的type-erasure-based generics是一批没有能力的人: 作出的极其短视的设计,
做起来容易,后患无穷。"
我同意后半段 但不同意前半段
Java Generics 是由 Brian Goetz领导的 这哥们熟悉Java都认识(Java Concurrency
in Practice的作者) 要说他没有能力我绝对不能赞同 在很多场合下他都提过当初为什
么没有在JVM level做generics, 最主要的原因就是向后兼容
我之前说过向后兼容就是JAVA的萧何 成也萧何败也萧何 简单归论为做的人没有能力我
觉得是不公允的
Generics are a big step forward in the type-safety of the Java language, but
the design of the generics facility, and the generification of the class
library, were not without compromises. Extending the virtual machine
in... 阅读全帖
j*******l
发帖数: 1066
12
来自主题: Programming版 - 其实吧,C#是最好的语言。。。
"java的type-erasure-based generics是一批没有能力的人: 作出的极其短视的设计,
做起来容易,后患无穷。"
我同意后半段 但不同意前半段
Java Generics 是由 Brian Goetz领导的 这哥们熟悉Java都认识(Java Concurrency
in Practice的作者) 要说他没有能力我绝对不能赞同 在很多场合下他都提过当初为什
么没有在JVM level做generics, 最主要的原因就是向后兼容
我之前说过向后兼容就是JAVA的萧何 成也萧何败也萧何 简单归论为做的人没有能力我
觉得是不公允的
Generics are a big step forward in the type-safety of the Java language, but
the design of the generics facility, and the generification of the class
library, were not without compromises. Extending the virtual machine
in... 阅读全帖
k*****e
发帖数: 22013
13
【 以下文字转载自 WaterWorld 讨论区 】
发信人: choi (choi), 信区: WaterWorld
标 题: Re: 在美国公共场所是不是不能随便take photo啊?
发信站: BBS 未名空间站 (Tue Sep 27 14:36:46 2011, 美东)
I am an libertarian. The short answer is as long as you are in the public
space (eg, roadsides), you are all right.
* libertarian (n): "a person who upholds the principles of individual
liberty especially of thought and action"
www.m-w.com
(1) If you are in a private place, you are subject to rules and regulations
of the owner. A day in mid-1990s, I was a... 阅读全帖
k*****e
发帖数: 22013
14
【 以下文字转载自 WaterWorld 讨论区 】
发信人: choi (choi), 信区: WaterWorld
标 题: Re: 在美国公共场所是不是不能随便take photo啊?
发信站: BBS 未名空间站 (Tue Sep 27 14:36:46 2011, 美东)
I am an libertarian. The short answer is as long as you are in the public
space (eg, roadsides), you are all right.
* libertarian (n): "a person who upholds the principles of individual
liberty especially of thought and action"
www.m-w.com
(1) If you are in a private place, you are subject to rules and regulations
of the owner. A day in mid-1990s, I was a... 阅读全帖
s**********t
发帖数: 1846
15
来自主题: ChinaNews版 - Flash-based SSD nearly impossible to erase
Researchers from the University of California at San Diego delivered a paper
at the FAST-11 Conference in San Jose, Calif., last week that shows it's
almost impossible to reliably erase data from a solid state drive.
The tome, "Reliably Erasing Data from Flash-Based Solid State Drives" (PDF),
goes through all of the known techniques for erasing data and comes up
short in every case. The study's method is straightforward: They put
repeating data on an SSD or USB drive, tried using various erasing... 阅读全帖
R****a
发帖数: 6858
16
来自主题: Military版 - 大棋局与9/11
大棋局与9/11
来源: ognc 于 2013-02-22 16:08:44[档案] [博客] [旧帖] [转至博客] [给我悄悄
话] 本文已被阅读:63次
字体:调大/调小/重置 | 加入书签| 打印| 所有跟帖 | 加跟贴| 查看当前最热讨论主题
The Moral Decoding of 9-11
By Prof. John McMurtry
(Journal of 9/11 Studies) - I was sceptical of the 9-11 event from the first
time I saw it on television. It was on every major network within minutes.
All the guilty parties were declared before any evidence was shown. The
first questions of any criminal investigation were erased. Who had the most
compelling motives for... 阅读全帖
t*******y
发帖数: 21396
17
来自主题: Military版 - Flash-based SSD nearly impossible to erase
Researchers from the University of California at San Diego delivered a paper
at the FAST-11 Conference in San Jose, Calif., last week that shows it's
almost impossible to reliably erase data from a solid state drive.
The tome, "Reliably Erasing Data from Flash-Based Solid State Drives" (PDF),
goes through all of the known techniques for erasing data and comes up
short in every case. The study's method is straightforward: They put
repeating data on an SSD or USB drive, tried using various erasing... 阅读全帖
b********n
发帖数: 38600
18
https://policy.m4bl.org/
Reparations
Reparations for the systemic denial of access to high quality educational
opportunities in the form of full and free access for all Black people (
including undocumented and currently and formerly incarcerated people) to
lifetime education including: free access and open admissions to public
community colleges and universities, technical education (technology, trade
and agricultural), educational support programs, retroactive forgiveness of
student loans, and... 阅读全帖
f***y
发帖数: 4447
19
http://bbs.netbig.com/thread-2702025-1-2.html
一期9篇研究性文章,1/3是科大的,郭光灿组两篇,潘建伟组一篇
另外在news and views还有一篇点评潘建伟的工作
etters
Experimental investigation of the no-signalling principle in parity–time
symmetric theory using an open quantum system - pp642 - 646
Jian-Shun Tang, Yi-Tao Wang, Shang Yu, De-Yong He, Jin-Shi Xu, Bi-Heng Liu,
Geng Chen, Yong-Nan Sun, Kai Sun, Yong-Jian Han, Chuan-Feng Li & Guang-Can
Guo
doi:10.1038/nphoton.2016.144
The violation of the no-signalling principle — information can be
tr... 阅读全帖

发帖数: 1
20
我可以看得到,copy paste将就看下吧
Image
CreditCreditPhoto illustration by Joan Wong. Photographs by Ronghui Chen for
The New York Times.
Skip to content
Skip to site index
Where Does Affirmative Action Leave Asian-Americans?
A high-profile lawsuit against Harvard is forcing students and their
families to choose sides.
CreditCreditPhoto illustration by Joan Wong. Photographs by Ronghui Chen for
The New York Times.
By Jay Caspian Kang
Photographs by Ronghui Chen
Published Aug. 28, 2019
Updated Sept. ... 阅读全帖
M****H
发帖数: 1057
21
这篇文章的原文。内容我不评论,我只想说,这写作和逻辑水平,在中学生里也是平均
水准之下,怎么进的哈佛?说歪理可以,说歪理也可以也说得很圆满自洽,梁校就是典
型。但这篇哈佛学生的文章真的是弱到爆炸。
https://www.thecrimson.com/article/2018/7/9/hyppolite-harvard-without-
affirmative-action/
A Room Full of Mirrors: Harvard Without Affirmative Action
By Jasmine N. Hyppolite July 9, 2018
Jasmine N. Hyppolite ’21 lives in Eliot House. She is political action
chair of the Black Students Association.
10
The recent news regarding accusations of disadvantages for and
discrimination against Asian-America... 阅读全帖
d******y
发帖数: 2787
22
感谢网友贴出全文
其实我认为这篇文章的逻辑水平的确是fake news的好范文, 前后观点呼应下,中间搞
点个人攻击,塞点翻来覆去的narratives,承认点不足但是坚决不改就齐活了,AA进来
的政治活动积极分子也就这样了。咋能按梁效的写作水平来要求他们呢?

发信人: MTWASH (83), 信区: USANews
标 题: Re: 哈佛大学校报 “没有平权措施的哈佛,整间教室恐怕都将是亚裔
发信站: BBS 未名空间站 (Fri Aug 31 17:40:35 2018, 美东)
这篇文章的原文。内容我不评论,我只想说,这写作和逻辑水平,在中学生里也是平均
水准之下,怎么进的哈佛?说歪理可以,说歪理也可以也说得很圆满自洽,梁校就是典
型。但这篇哈佛学生的文章真的是弱到爆炸。
https://www.thecrimson.com/article/2018/7/9/hyppolite-harvard-without-
affirmative-action/
A Room Full of Mirrors: Harvard Without Affirmative Action
By ... 阅读全帖
l****c
发帖数: 838
23
One my car title, there is one line:
ALTERATION OR ERASURE VOIDS THIS TITLE.
You don't have a title to register the car.
Don't you think the DMV offices share info?
Don't they have database?
t*****y
发帖数: 132
24
我的车被total了,在我把pink slip签好并寄送给保险公司以后,保险公司又发过来另
一张表格
statement to records ownership and statement of error or erasure. 要我签字。
我感到奇怪的事情是:
(1)我的title上面没有错误,但是要我签这个修改错误的表格。
(2)一开始,不是我的adjuster,而是另一个女的打电话来,要我签这个表格,并且
告诉我表格中有错,说我的mile数填错了。我在寄送pink slip以前,拍了照片。在和
她说完以后,我查看了照片,发现没有错。她这样给我的感觉不好。
(3)现在我的adjuster也让我签这个表格,我问他到底是什么错,他告诉我没什么错
,就是要以防万一。他们两个人前后不一致。
(4)如果要我签这个表格,应该一开始就让我签,而不是等到我把pink slip寄出去以
后再让我签。这也让我感到疑惑。
不知道大家有没有遇到过类似的情况,在车被total以后,是否也签过这 statement of
error的表格。
多谢!
j********x
发帖数: 2330
25
来自主题: JobHunting版 - [hortonworks面经] senior hadoop engineer
第一个就是erasure coding吧
j********x
发帖数: 2330
26
来自主题: JobHunting版 - [hortonworks面经] senior hadoop engineer
第一个就是erasure coding吧
p*****2
发帖数: 21240
27
来自主题: JobHunting版 - 对scala很失望
写过Scala程序的人可能都有一种感觉,编译scala源代码的速度比较慢。是的,
Scala编译源代码的速度确实较慢。
Martin Odersky对此作出了解释:http://stackoverflow.com/questions/3606591/why-does-intellij-idea-compile-scala-so-slowly/3612212#3612212
主要有四点:
类型推断是耗时的操作,尤其需要搜索隐式转换(Type inference is costly, in
particular if it involves implicit search.)
Scalac需要做两次类型检查,第一次是针对scala类型规则,第二次是针对Java类型规
则(Scalac has to do type checking twice; once according to Scala's rules
and a second time after erasure according to Java's rules.)
从Scala到Java需要大约15次转换(Besides ... 阅读全帖
t****e
发帖数: 279
28
What is iterator invalidation?
Answer:
Insertion
Sequence containers
vector: all iterators and references before the point of insertion are
unaffected, unless the new container size is greater than the previous
capacity (in which case all iterators and references are invalidated) [23.2.
4.3/1]
deque: all iterators and references are invalidated, unless the inserted
member is at an end (front or back) of the deque (in which case all
iterators are invalidated, but references to elements are unaffe... 阅读全帖
d********w
发帖数: 363
29
硅谷最火的高科技创业公司都有哪些?
在硅谷大家非常热情的谈创业谈机会,我也通过自己的一些观察和积累,看到了不少最
近几年涌现的热门创业公司。我给大家一个列表,这个是华尔街网站的全世界创业公司
融资规模评选(http://graphics.wsj.com/billion-dollar-club/)。它本来的标题是billion startup club,我在去年国内讲座也分享过,不到一年的时间,截至到2015年1月17日,现在的排名和规模已经发生了很大的变化。首先,估值在10Billlon的达到了7家,而一年前一家都没有。其次,第一名是中国人家喻户晓的小米,第三,前20名中,绝大多数(8成在美国,在加州,在硅谷,在旧金山!)比如Uber, Airbnb, Dropbox, Pinterest. 第四 里面也有不少相似模式成功的,比如Flipkart就是印度市场的淘宝,Uber与Airbnb都是共享经济的范畴。所以大家还是可以在移动(Uber),大数据(Palantir),消费级互联网,通讯(Snapchat),支付(Square),O2O App里面寻找下大机会。这里面很多公司我都亲自面... 阅读全帖
k******n
发帖数: 184
30
这题答到两个点就行了
1. type erasure产生无类型的object;
2.只有obj才能override hashCode(), primitive不行;
z****n
发帖数: 3189
31
其实老夫只是路过向各位按摩店股东祝贺,已经不炒股很多年了(没钱)
最近公司要搭deep learning cluster跑视频图像识别training,老夫一直在向老板安
利EPYC,便宜量又足,epyc 7281 16 cores才700刀,有128条pcie 3.0 lane ,简直是
DL神器(虽然cost大头从来都是在女大显卡不在CPU上),可惜老板不同意,说觉得按
摩店不靠谱。。。
但是保不准其他公司会买啊,相信识货的人还是会有的。
就老夫现在手底下的服务器,除了跑storage的因为用了牙膏厂ISA-L加速erasure
coding而必须要用牙膏厂CPU外,觉得其他完全没必要用牙膏厂,贵而且core少。
g*******1
发帖数: 2799
32
= =b
找到了
原来是erasure的
x*******1
发帖数: 28835
33
来自主题: PhotoGear版 - 悲剧之后请教数据存储方案
存进去都是都是加密的,而且都是都用erasure code编码的。 别人看到也没用。 只
有amazon glacier才有11个9 的durability。 其他都是cheap solution。照样丢,丢
了也不赔你。
r*********e
发帖数: 29495
34
Music Heaven 美好的回忆
音乐天堂1~36的目录 Music Heaven Vol.1~Vol.362007-04-16 14:01Music Heaven Vol
.1
1 Everything I Do, I Do It For You - Bryan Adams
2 Pretty Woman - Ronan
3 Windflowers - Seals & Crofts
4 Rush Rush - Paula Abdul
5 I'd Love You To Want Me - Lobo
6 Black Or White - Michael Jackson
7 Tears In Heaven - Eric Clapton
8 Save The Best For Last - Vanessa Williams
9 Seasons In The Sun - Terry Jacks
... 阅读全帖
d*******e
发帖数: 558
35
来自主题: TrustInJesus版 - 信佛教呢?还是信基督教?

你以为这些资料都是发表在知音读者之类的杂志上吗?
google一下就有很多资料。
Wheeler, J. A. in Mathematical Foundations of Quantum Theory (ed Marlow, A.
R.) (Academic Press, 1978).
Jacques, V. et al. Experimental realization of Wheeler’s delayed-choice
gedanken experiment. Science 315, 966–968 (2007).
A. G. Manning, R. I. Khakimov, R. G. Dall, A. G. Truscott. "Wheeler's
delayed-choice gedanken experiment with a single atom.". Nature Physics,
2015. doi:10.1038/nphys3343.
Jump up ^ "Quantum erasure with causally disconnected choice... 阅读全帖
d*******e
发帖数: 558
36
来自主题: TrustInJesus版 - 信佛教呢?还是信基督教?

你以为这些资料都是发表在知音读者之类的杂志上吗?
google一下就有很多资料。
Wheeler, J. A. in Mathematical Foundations of Quantum Theory (ed Marlow, A.
R.) (Academic Press, 1978).
Jacques, V. et al. Experimental realization of Wheeler’s delayed-choice
gedanken experiment. Science 315, 966–968 (2007).
A. G. Manning, R. I. Khakimov, R. G. Dall, A. G. Truscott. "Wheeler's
delayed-choice gedanken experiment with a single atom.". Nature Physics,
2015. doi:10.1038/nphys3343.
Jump up ^ "Quantum erasure with causally disconnected choice... 阅读全帖
d*******e
发帖数: 558
37
来自主题: TrustInJesus版 - 信佛教呢?还是信基督教?

你以为这些资料都是发表在知音读者之类的杂志上吗?
google一下就有很多资料。
Wheeler, J. A. in Mathematical Foundations of Quantum Theory (ed Marlow, A.
R.) (Academic Press, 1978).
Jacques, V. et al. Experimental realization of Wheeler’s delayed-choice
gedanken experiment. Science 315, 966–968 (2007).
A. G. Manning, R. I. Khakimov, R. G. Dall, A. G. Truscott. "Wheeler's
delayed-choice gedanken experiment with a single atom.". Nature Physics,
2015. doi:10.1038/nphys3343.
Jump up ^ "Quantum erasure with causally disconnected choice... 阅读全帖
c**i
发帖数: 6973
38
来自主题: Hardware版 - Samsung
(1) Samsung and its attractions | Asia’s New Model Company: Samsung’s
recent success has been extraordinary. But its strategy will be hard to copy
. Economist, Oct 1, 2011.
http://www.economist.com/node/21530984
Quote:
"It is easy to see why China might like the chaebol model. South Korea’s
industrial titans first prospered in part thanks to their close ties with an
authoritarian government (though Samsung was not loved by all the generals)
. Banks were pressured to pump cheap credit into the... 阅读全帖
T*****e
发帖数: 361
39
来自主题: Java版 - 问一个generic的问题吧
Yes. I had googled for a solution to that problem and found an article,
which had detailed explanation about the warnings and type erasure.
It memtioned the annotation solution.
I guess it is a better solution for the compiler to figure out a way to
remember the erased type information. A fatal error can hide behide a
warning anyway.
F****n
发帖数: 3271
40
来自主题: Java版 - how to do this?
Java template variable declaration, (not type parameters in class definition
), does NOT have any impact on compiled binary code. Search for type erasure.
g******z
发帖数: 5809
41
来自主题: Java版 - 求教:Thinking in java
看TIJ的Generics,从Erasure就开始晕了。这章怎么学啊
q*********u
发帖数: 280
42
来自主题: Java版 - 面试的一些题目
有几个题还是不太明白
2.What is erasure of Generics
这个what 是不是改成when比较好,因为你的答案里面有一个when compiling java
source to bytecode, then jvm remove the type of generics
5. drawbacks of lazy initialization
不太明白你的答案,能不能解释一下
第11题的话,你的pass by value的确是太安慰我了,不过个人觉得面试的时候,直
接笼统的说pass by value,应该有些补充,比如:
public class XXX{
...
public static void method(A a){
//进入函数后,调用的函数中的参数会被copy, 那么内存中起码有2个指向a
的ref,所以说,本质上是pass by value 没有错。
a.setVar(...); //可以改变a所指向的对象A的值
a = new A(); //这个时候,a 就指向另外一个新建的A了,和函数外的对象
A脱离了;
N***m
发帖数: 4460
43
来自主题: Java版 - type erasure weird problem
MyEclipse没有任何问题
F****n
发帖数: 3271
44
来自主题: Java版 - type erasure weird problem
What will happen if I call
Map m = new HashMap();
fun(m);
How can it pick up the difference??
s******n
发帖数: 876
45
来自主题: Java版 - type erasure weird problem
I read it somewhere but I can't be sure I remember it clearly.
Apparently, even before Generics, at java byte code level,
a class is allowed to have two methods of same signature,
if they have different return types.
class A // pseudo byte code
f(List)->String
f(List)->Integer
The byte code reference to a method actually includes the
return type, therefore the two methods can be distinguished.
// pseudo byte code invoking two methods
(A.f(List)->String) ();
(A.f(List)->Integer) ();
Of ... 阅读全帖
F****n
发帖数: 3271
46
来自主题: Java版 - type erasure weird problem
That's because you confuse Java language vs JVM byte code. They are not the
same by specification and JVM byte code can have a lot of illegal Java
constructs.
In fact today's best obfuscator utilizes this, for instance, directly write
a compiled byte code to replace Java names with weird illegal characters to prevent
decompiling.
Back to the question, I think LZ simply made a wrong observation during compiling. The class can be compiled but the caller will have problem if no Generic parameters a... 阅读全帖
F****n
发帖数: 3271
47
来自主题: Java版 - It's a Java Bug
After some research, it seems that the "type erasure" problem is due to a
Java bug: javac should NOT be able to compile two methods with same
signature but different return types.
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6182950
According to the link below, this misbehavior is fixed in some Eclipse
version, which is correct while javac is wrong.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=273862
r****n
发帖数: 1088
48
来自主题: Java版 - how will u improve java?
type erasure.
primitive types become objects.
closure (not really important).
f*******n
发帖数: 12623
49
No, all generics are erased after compiling. There is no T. Anything you can
get you must get from stuff that you have at runtime.
Think about it, after type erasure your class looks like this:
public class GenericReflection
{
private Object object;
//---- get/set ---
public void setObject( Object v ){ object=v; }
public Object getObject(){ return object; }
//---- is it possible to get the class for the object? ----
public Class getObjectClass()
{
Class retval = null;

if... 阅读全帖
f*******n
发帖数: 12623
50
No, all generics are erased after compiling. There is no T. Anything you can
get you must get from stuff that you have at runtime.
Think about it, after type erasure your class looks like this:
public class GenericReflection
{
private Object object;
//---- get/set ---
public void setObject( Object v ){ object=v; }
public Object getObject(){ return object; }
//---- is it possible to get the class for the object? ----
public Class getObjectClass()
{
Class retval = null;

if... 阅读全帖
1 2 下页 末页 (共2页)