Using C#'s Type System Effectively - Benjamin Hodgson

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

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

  • @WarrenLeggatt
    @WarrenLeggatt 5 ปีที่แล้ว +6

    Just found this. Just makes me realise how much work the syntax F# provides in this realm gives for you. So much boiler plate to do the same.

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

    +1 for encouraging people to lean on the compiler. It's one of the biggest value adds of a strongly typed language. A properly designed type system doesn't permit your system to be in an invalid and/or inconsistent state.

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

    Level God programming series, the 'black belt' episode.

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

    To prevent subclassing, use the "sealed" modifier. I believe it existed when this video was made.

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

      i think that was part of the original C#1.0 language, before generics even

  • @alexandertsvetkov
    @alexandertsvetkov 7 ปีที่แล้ว +1

    That was enlightening, thanks for food for thought!

  • @nmarcel
    @nmarcel 7 ปีที่แล้ว +10

    Finallly! a .NET functional programming talk not using F# (nor Haskell) but the language that most of us use: C#.

    •  7 ปีที่แล้ว +8

      doing a .NET talk using Haskell is quite hard - so no surprise there ;)

  • @EricInTheNet
    @EricInTheNet 7 ปีที่แล้ว

    It would be great to have the example implementation of the JqlParser using Pidgin so that we can see how to use the library in the correct way. The Json and Xml examples are a bit terse for me to follow.
    Also, implementing the Parser as described in the video does not work. The Tag element is always returned with an empty string for value.

    • @EricInTheNet
      @EricInTheNet 7 ปีที่แล้ว

      I put up the code in a gist. gist.github.com/ewinnington/a4cf4db7285e0bdcbbb998665be5228d

  • @samiviitala2824
    @samiviitala2824 7 ปีที่แล้ว +10

    Nice talk but misses the topic "Using C#'s Type System Effectively" pretty much completely.

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

    "i work at stack overflow with the team that brought you stack overf-" backbackbackbackBACKBACKBACKBACKBAAAACK

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

    Add more operations and you have an explosion of arguments in the Match function in addition to having to change the function signature all over. All of this to avoid missing the implementation of one operator and possibly running into a run time error? Well, you would have to fire the moron that checked-in code with the "or" operator but did not bother implementing it nor adding a unit test either.

  • @HankeStefan
    @HankeStefan 7 ปีที่แล้ว +1

    The code that you call "lightweight visitor" looks a lot like what amalloy calls a "catamorphism" [1]. What I dislike about the code (just like visitor): you need to touch every class that is part of the tree structure. Further, it looks like there is some form of implicit coupling, since all subclasses know all others via "Match".
    Thinking about it - the code also looks like a "dissolved" visitor - in a visitor, there is a method for all subclasses. Here, these methods are explicitly stated. Haskell helps by enforcing that functions must be total - in case the type is extended, it will complain.
    Thanks for showing of that code!
    [1] stackoverflow.com/questions/46554677/is-it-possible-to-write-pattern-matched-functions-in-pointfree-form

  • @suhuy2008
    @suhuy2008 7 ปีที่แล้ว

    I knew that the parser part was inspired by Parsec. Benjamin definitely has Haskell background.

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

    "Any question so far?"... silence... audience lost...