由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - 这次Go丢人有点大呀
相关主题
问一个C++ template的问题Question about COM
qeustion about separation of interface and implementation in javaa good example how to implement a generic hashmap in c
问个弱问题,C++为什么把interface和implementation分开?有懂obj-c 的吗?
Java 8 闪亮发布了static polymorphism一问
《C# 5.0 核心技术》第5版[PDF]Interface segregation principle似乎没啥意义啊
其实微软是个做语言的公司java 的interface是相当于ruby的module吗?
Go什么时候可能支持Generic?问一个JAVA Interface Design的问题
发现还没写过IInterface {....}JAVA generic programming 是怎么实现的?
相关话题的讨论汇总
话题: go话题: interface话题: java话题: baset话题: linklist
进入Programming版参与讨论
1 (共1页)
p*****2
发帖数: 21240
n****1
发帖数: 1136
2
The author is plainly stupid. All his problem with Go can be attributed to
the lack of generics, so he choose java... good choice, except that:Java is
just doing type erasure!!!
He can simply declare a stub interface in Go and implement this interface in
all his 6 data types. Then write his generic functions only on this
interface, that is all java did.
j********x
发帖数: 2330
3
Srinivas JONNALAGADDA
Works at Ojus Software Labs Private Limited, Hyderabad
Lives in Hyderabad, India
2爷说相声还是靠谱的。。。
f******y
发帖数: 46
4
Hi nod101
Would you mind showing some sample code of your proposal? Thanks

is
in

【在 n****1 的大作中提到】
: The author is plainly stupid. All his problem with Go can be attributed to
: the lack of generics, so he choose java... good choice, except that:Java is
: just doing type erasure!!!
: He can simply declare a stub interface in Go and implement this interface in
: all his 6 data types. Then write his generic functions only on this
: interface, that is all java did.

b*******s
发帖数: 5216
5
看上去是这个人希望go有比较成熟的泛型库,但没有,就自己实现了一个效率很糟糕的
是这样吗?

【在 p*****2 的大作中提到】
: Another go at Go ... failed!
: http://oneofmanyworlds.blogspot.co.uk/2014/01/another-go-at-go-

n****1
发帖数: 1136
6
擦, 没注意到原来是三哥
二爷的坑我以后不跳了

【在 j********x 的大作中提到】
: Srinivas JONNALAGADDA
: Works at Ojus Software Labs Private Limited, Hyderabad
: Lives in Hyderabad, India
: 2爷说相声还是靠谱的。。。

j********x
发帖数: 2330
7
这不是一个普通的三哥,是在印度本土上班的纯种三哥。。。

【在 n****1 的大作中提到】
: 擦, 没注意到原来是三哥
: 二爷的坑我以后不跳了

n****1
发帖数: 1136
8
没怎么写过go, 懒得去查语法了,给个C++里面class例子好了:
class baseT{}; //class is just a dumb interface
class Linklist{
baseT* payload;
Linklist* next;
};
这样任何实现了baseT都能被与Linklist有关的函数操作了. 在Go里做个stub
interface就和这里的baseT是一个意思.
这个等价于C++模板里面做出的linklist container.

【在 f******y 的大作中提到】
: Hi nod101
: Would you mind showing some sample code of your proposal? Thanks
:
: is
: in

c*******0
发帖数: 5247
9
这个人谴责Go没有generics, 他就得maintain multiple implementations of similar
things and ultimately led him to rewrite it all in Java because of the
overhead in maintaining the different-but-similar things and backporting
features between those different implementations.
是他不会用interface还是他在搞笑?
而且他的整个程序没有用channel......让他给代码出来帮他profile他说IP issue不能
给...
有时候程序员烂了,挡都挡不住
1 (共1页)
进入Programming版参与讨论
相关主题
JAVA generic programming 是怎么实现的?《C# 5.0 核心技术》第5版[PDF]
请教matlab转C++其实微软是个做语言的公司
为什么我的visual C++ 找不到 "Stdafx.h" ?Go什么时候可能支持Generic?
How to return an array in a C++ function?发现还没写过IInterface {....}
问一个C++ template的问题Question about COM
qeustion about separation of interface and implementation in javaa good example how to implement a generic hashmap in c
问个弱问题,C++为什么把interface和implementation分开?有懂obj-c 的吗?
Java 8 闪亮发布了static polymorphism一问
相关话题的讨论汇总
话题: go话题: interface话题: java话题: baset话题: linklist