WildCat
V2EX  ›  问与答

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

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

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

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