Revamping and Extending Kotlin's Type System | Ross Tate

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

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

  • @matjojo1000
    @matjojo1000 2 หลายเดือนก่อน +8

    This seems very exciting. Now that it has been a while since this was originally presented, do you have any papers released on this flow-based type-checking algorithm? Your claim of polynomial time is very promising.

  • @stefku76
    @stefku76 หลายเดือนก่อน

    the topic is very interesting, thanks for sharing

  • @nO_d3N1AL
    @nO_d3N1AL 2 หลายเดือนก่อน +1

    Fascinating talk, great presentation of technical academic research into an understandable yet detailed format programmers can relate to.

  • @mariodanielruizsaavedra1486
    @mariodanielruizsaavedra1486 2 หลายเดือนก่อน +3

    Feels like they're bringing Ceylon back.

  • @techaido
    @techaido 2 หลายเดือนก่อน

    28:50 Errors and Exceptions 😱🤯 Golang wants to conquer Kotlin.
    💡You can create your custom exceptions as a value.

  • @piaIy
    @piaIy 2 หลายเดือนก่อน

    25:51 last(...) wouldn't throw if the result is null (e.g. in case of a String? sequence) while lastOrError(...)!! would, so they are not the same.

  • @KuroKazeZX
    @KuroKazeZX 2 หลายเดือนก่อน

    i love error as values, please do this

  • @DM-fw5su
    @DM-fw5su 2 หลายเดือนก่อน

    @24:35 why is the return type T|NoSuchValue and not T?|NoSuchValue
    I presume this is an oversight also the function args need to use T? If the intention (as per the verbal commentary) was to distinguish between a null value in the Sequence and the soft error condition.
    Other than this a great presentation and I look forward to seeing it ready some time soon and I'm sure project Arrow users will issue a new major release.

    • @bagadeshkumarr9502
      @bagadeshkumarr9502 2 หลายเดือนก่อน +4

      There are two types of nullability interfered. One from caller side or from return type side.
      One the first lastOrNull return type has to T? because we are sure there is a possibility it will be null irrespective of caller T.
      One the second lastOrNull(supporting union), return type is T|NoSuchValue because we are sure either we return T or NoSuchValue.
      Now when you call Something like this
      val list1 = list(1, null, 2)
      val list2 = list(1, 2)
      val value1 : T? | NoSuchType = list1.lastOrNull()
      val value2 : T | NoSuchType = list2.lastOrNull()
      Based on the callers generic ( T or T?) it will confirm whether it is T or T?

  • @techaido
    @techaido 2 หลายเดือนก่อน

    18:44 What’s the different in the algorithms ???

  • @AdibCodes
    @AdibCodes 2 หลายเดือนก่อน

    Great talk!

  • @gustavbw
    @gustavbw 2 หลายเดือนก่อน

    Now, I don't know much about Kotlin, but I have been using Java for quite a while - and run into almost every single bug that type system has.
    Anyhow. Why arent more people talking about functional concepts like a pure function? It seems to me, that being able to know that a function has no side effects, would be extremely useful for type checking. And just generally useful programmatically, although OOP bros seem pretty against it universally because its nearly impossible to prove theoretically (although in practice it very much is - which is also a great distinction you made). I believe java has the @pure annotation for functions - but I might be mixing up languages right now, but again. Thats a separate, annotation pre-processing pass, and not actually a part of the language which IMO is a shame.
    What Kotlin I have done, have been great although it was a little syntactially ambiguous and messy, but I also started with probably the most boilerplate heavy language outside of the C's (C & C++).

  • @juneuniversum
    @juneuniversum 2 หลายเดือนก่อน +1

    arrow-kt-raise out of box

  • @fabianomello9141
    @fabianomello9141 2 หลายเดือนก่อน +5

    Camera should zoom out and stand still, for god's sake.

    • @noelgomile3675
      @noelgomile3675 2 หลายเดือนก่อน

      I was thinking the same thing.

  • @sakesun
    @sakesun 2 หลายเดือนก่อน +1

    I want to go back to dynamic language after this 🤣

  • @CielMC
    @CielMC 2 หลายเดือนก่อน +2

    JVM folks discovering error-as-value and emulating algebraic datatypes are so funny to me

    • @wollf92
      @wollf92 หลายเดือนก่อน

      Kotlin already works wonders with algebraic data types using sealed interfaces and classes. It's just that you need to define them separately outside of the function scope. This union type between data or error just makes writing it easier and allows you to return error values without defining them per function

    • @CielMC
      @CielMC หลายเดือนก่อน

      @@wollf92 Ye I know about the sealed type + object/class pattern but it is extra verbose, one more indirection, amongst other things, proper support for them would be nice. As I said, this is more or less just an emulation of true ADT

    • @balen7555
      @balen7555 20 วันที่ผ่านมา

      Scala is on the JVM rofl.

  • @gustavbw
    @gustavbw 2 หลายเดือนก่อน

    25:00, y no Golang mention? Seems like you guys went with the best of both worlds from Golang, JS/TS and previous Kotlin versions (maybe a hint of Zig too). No shame in that.

    • @guai9632
      @guai9632 2 หลายเดือนก่อน +2

      one don't mention golang in a polite society