WildCat
V2EX  ›  问与答

Go 语言可不可以扩展系统类型? 类似 Rails 的 3.days 这样

  •  
  •   WildCat · Oct 19, 2014 · 2575 views
    This topic created in 4313 days ago, the information mentioned may be changed or developed.
    2 replies    2014-10-19 11:16:35 +08:00
    SErHo
        1
    SErHo  
       Oct 19, 2014 via Android   ❤️ 1
    可以啊,只不过做不到这么纯粹而已。
    bcxx
        2
    bcxx  
       Oct 19, 2014   ❤️ 1
    type 一下 localtype 就可以了(当然不会像 3.days 那么销魂……

    https://gist.github.com/bcho/511168ace7cbcc150903

    另外就是 golang 里面不追求这样的写法吧
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3254 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 11:08 · PVG 19:08 · LAX 04:08 · JFK 07:08
    ♥ Do have faith in what you're doing.