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

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

    fold 没听说过。囧
    ling0322
        14
    ling0322  
       2013 年 12 月 2 日
    @sillyousu 问题就是go好像还没有支持泛型吧,咱想用类似于rust的[1, 2, 3].iter().map(|&x| x * x).filter(|&x| x > 5);这种数据操作呢
    xdeng
        15
    xdeng  
       2013 年 12 月 2 日
    模板 支持 判断 非布尔型了
    rlx
        16
    rlx  
       2013 年 12 月 2 日
    新增了数据库的打开连接数限制,另外GC性能有提升
    cyberscorpio
        17
    cyberscorpio  
       2013 年 12 月 2 日
    @ling0322 靠,这个写法。。。
    rwx
        18
    rwx  
       2013 年 12 月 2 日
    @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 月 2 日
    什么能有引入包版本号的支持?
    ling0322
        20
    ling0322  
       2013 年 12 月 2 日
    @cyberscorpio 所以咱才喜欢FP风格的语言嘛,简洁美观
    sillyousu
        21
    sillyousu  
    OP
       2013 年 12 月 2 日
    @ling0322

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

    https://gist.github.com/sillyousu/7748152
    ling0322
        22
    ling0322  
       2013 年 12 月 2 日
    @sillyousu 咦,这个好像很有趣的样子啊(不知道有没有现成的库呢
    jiyinyiyong
        23
    jiyinyiyong  
       2013 年 12 月 3 日
    @sillyousu 新手表示看到 `interface{}` 这么用很新奇,
    请问 `arg.(int)` 这里具体是什么意思?
    关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   2692 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 10:09 · PVG 18:09 · LAX 02:09 · JFK 05:09
    ♥ Do have faith in what you're doing.