Type Hints - Guido van Rossum - PyCon 2015

แชร์
ฝัง
  • เผยแพร่เมื่อ 14 ต.ค. 2024

ความคิดเห็น • 27

  • @MaikSpike
    @MaikSpike 9 ปีที่แล้ว +34

    Guido is the best thing ever to happen to Python

    • @Krasbin
      @Krasbin 8 ปีที่แล้ว +2

      +Miguel ‘Maikflow’ Pena And without Guido there would be no Python. He sorta kinda started it all.

    • @filiphron3147
      @filiphron3147 8 ปีที่แล้ว +10

      +Miguel „Maikflow“ Pena Python is the best think that happened to Guido.

    • @msshroff
      @msshroff 6 ปีที่แล้ว +1

      actually pyhon is the best thing ever to happen to guido :)

    • @sadhlife
      @sadhlife 3 ปีที่แล้ว +2

      here's the right quote: Guido is Python

  • @jk3089
    @jk3089 4 ปีที่แล้ว +2

    OMG! I have never been expecting I'll watch Guido Van Rossam

  • @megalowhale8175
    @megalowhale8175 9 ปีที่แล้ว +25

    "Some bugs get found sooner if you have type annotations."
    Understatement of the century. It completely eliminates an entire class of errors. Personally, when languages come out that DON'T feature type-checking, I really feel like this is regressive and taking a step in the wrong direction.

    • @Konstruktivismus
      @Konstruktivismus 8 ปีที่แล้ว +1

      I am not so sure about that. If you write tests for all parts of your code (coverage=100%), then you also have some sort of type checking of the whole code. And actually this testing removes many other types of errors as well, and therefore is just necessary to write stable and good code.

    • @megalowhale8175
      @megalowhale8175 8 ปีที่แล้ว +8

      Konstruktivismus​ unit testing alone is NOT enough. There are many possible type errors which remain possible even with 100% coverage. This becomes more apparent the less trivial the code base is. Look up the article by Evan Farrer on unit testing + static typing, as he provides a number of examples of this.

  • @WasiMaster
    @WasiMaster 3 ปีที่แล้ว +6

    At 28:04. The better world example now works as of python 3.9 :)

  • @Twisted_Code
    @Twisted_Code 3 ปีที่แล้ว

    thank you for this awesome feature I didn't realize existed until about two weeks ago. I've already preemptively caught at least one bug thanks to my IDE using a type hint I included. I imagine it won't be the last.

  • @garlic-os
    @garlic-os 4 ปีที่แล้ว +1

    Can I get a picture of you with that mango thing?

  • @Twisted_Code
    @Twisted_Code 3 ปีที่แล้ว +1

    12:15 "legacy code you don't want to change" yeah... as the saying goes, if it isn't broke, don't *_touch_* it!

  • @nikosc
    @nikosc 9 ปีที่แล้ว +2

    is there intention from any popular open source python libraries (e.g. django, pyramid, sqlalchemy..) to use type hints in their codebase?

    • @ovangle
      @ovangle 9 ปีที่แล้ว

      Nikos C. The simple answer would be no, not in the short term, because they're all stuck using six libraries to support users on py2.

    • @AistisJokubauskas
      @AistisJokubauskas 8 ปีที่แล้ว

      +Thomas Stephenson well I don't quiet understand your statement. If I
      understood correctly type information goes into pyi file, which is not
      interpreted by python 2. Would it be correct?

    • @VaibhavMishraVM
      @VaibhavMishraVM 8 ปีที่แล้ว

      +Kiki Klank yes according to the slides.

  • @nikolayyotsov1240
    @nikolayyotsov1240 5 ปีที่แล้ว +1

    what happen to "Explicit is better than implicit.
    " ?

    • @robbert-janmerk6783
      @robbert-janmerk6783 5 ปีที่แล้ว +4

      I would rather ask: what happened to "There should be one-- and preferably only one --obvious way to do it."

    • @sadhlife
      @sadhlife 3 ปีที่แล้ว +4

      this is explicit :0

    • @sadhlife
      @sadhlife 3 ปีที่แล้ว +3

      @@robbert-janmerk6783 I'll be honest. writing typed code is the only obvious way to write most Python code now

    • @legion_prex3650
      @legion_prex3650 2 ปีที่แล้ว

      @@sadhlife WORD!

    • @astroboy512
      @astroboy512 ปีที่แล้ว

      @@robbert-janmerk6783 "preferably only one", note the "preferebly"

  • @ashrasmun1
    @ashrasmun1 4 ปีที่แล้ว

    imo everyone who disregards the power of types is just irresponsible

  • @calebparks8318
    @calebparks8318 ปีที่แล้ว

    No offense, but C++ saw this coming from before.

  • @tomaszmakuch
    @tomaszmakuch 2 ปีที่แล้ว

    Guy who edited the video had one job: NOT to cover the slides with little Guido...

  • @TheDragonAzz
    @TheDragonAzz 3 ปีที่แล้ว +2

    "...High technical topic, I'm afraid people might not understand it.."
    It's Guido!! I'm freaking watching it, understand everything or not.