V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
The Go Programming Language
http://golang.org/
Go Playground
Go Projects
Revel Web Framework
sillyousu
V2EX  ›  Go 编程语言

Go 1.2 发布

  •  
  •   sillyousu ·
    sillyousu · 2013-12-02 09:18:33 +08:00 · 3130 次点击
    这是一个创建于 3798 天前的主题,其中的信息可能已经有所发展或是发生改变。
    23 条回复    1970-01-01 08:00:00 +08:00
    0x61
        1
    0x61  
       2013-12-02 10:13:47 +08:00
    已经装上了
    puras
        2
    puras  
       2013-12-02 10:31:29 +08:00
    嗯,刚从1.2RC5更新到正式版。哈
    不过只看了一下版本号,之后就。。。该干嘛干嘛了
    sillyousu
        3
    sillyousu  
    OP
       2013-12-02 11:10:01 +08:00
    @puras 是的啊。 没有非常特别的改进。
    puras
        4
    puras  
       2013-12-02 12:10:28 +08:00   ❤️ 1
    @sillyousu 好像1.3的TODO List已经放出来了。。。
    initialdp
        5
    initialdp  
       2013-12-02 12:31:24 +08:00
    好像不久前才1.1,这个golang难道也像chrome一样会成为版本帝么?
    feuvan
        6
    feuvan  
       2013-12-02 13:06:34 +08:00
    http 自动支持 HEAD request 不错
    sillyousu
        7
    sillyousu  
    OP
       2013-12-02 13:14:53 +08:00
    meta
        8
    meta  
       2013-12-02 13:31:10 +08:00
    有个奇怪的改进,切片操作可以一次性搞定长度和容量,写法方便了点,但没看出来有什么重要意义。
    meta
        9
    meta  
       2013-12-02 13:32:56 +08:00
    @initialdp 你不纠结数字不就行了么,如果他们用发布日期作为版本号,你是不是就没意见了呢。
    xiaoxuxu
        10
    xiaoxuxu  
       2013-12-02 13:42:44 +08:00
    Goroutine现在改成preemptive了,有点nb,不知道底层怎么调度的
    ling0322
        11
    ling0322  
       2013-12-02 13:42:55 +08:00
    咱一直在等FP中的map/fold/filter什么的支持呢(
    initialdp
        12
    initialdp  
       2013-12-02 13:52:11 +08:00
    @meta 倒不是纠结在数字。而是如果应用到生产环境的话,毕竟还希望有稳定的工具链。如果版本变换太快,未必是件好事。
    sillyousu
        13
    sillyousu  
    OP
       2013-12-02 13:57:25 +08:00
    @ling0322

    现在自己写个map/filter应该不难吧?

    fold 没听说过。囧
    ling0322
        14
    ling0322  
       2013-12-02 14:09:09 +08:00
    @sillyousu 问题就是go好像还没有支持泛型吧,咱想用类似于rust的[1, 2, 3].iter().map(|&x| x * x).filter(|&x| x > 5);这种数据操作呢
    xdeng
        15
    xdeng  
       2013-12-02 14:23:59 +08:00
    模板 支持 判断 非布尔型了
    rlx
        16
    rlx  
       2013-12-02 14:54:26 +08:00
    新增了数据库的打开连接数限制,另外GC性能有提升
    cyberscorpio
        17
    cyberscorpio  
       2013-12-02 15:58:06 +08:00
    @ling0322 靠,这个写法。。。
    rwx
        18
    rwx  
       2013-12-02 16:57:57 +08:00
    @xiaoxuxu
    The scheduler is invoked occasionally upon entry to a function. This means that any loop that includes a (non-inlined) function call can be pre-empted, allowing other goroutines to run on the same thread.

    这看起来就是一个缓解死循环的措施而已。。
    Numbcoder
        19
    Numbcoder  
       2013-12-02 17:09:26 +08:00
    什么能有引入包版本号的支持?
    ling0322
        20
    ling0322  
       2013-12-02 19:16:04 +08:00
    @cyberscorpio 所以咱才喜欢FP风格的语言嘛,简洁美观
    sillyousu
        21
    sillyousu  
    OP
       2013-12-02 19:27:00 +08:00
    @ling0322

    泛型估计不会有了。 interface 凑合用吧。
    <script src="https://gist.github.com/sillyousu/7748152.js"></script>

    https://gist.github.com/sillyousu/7748152
    ling0322
        22
    ling0322  
       2013-12-02 20:28:46 +08:00
    @sillyousu 咦,这个好像很有趣的样子啊(不知道有没有现成的库呢
    jiyinyiyong
        23
    jiyinyiyong  
       2013-12-03 22:48:38 +08:00
    @sillyousu 新手表示看到 `interface{}` 这么用很新奇,
    请问 `arg.(int)` 这里具体是什么意思?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1242 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 23:49 · PVG 07:49 · LAX 16:49 · JFK 19:49
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.