Pipe Forward: A Kick-Start into Functional Programming

แชร์
ฝัง
  • เผยแพร่เมื่อ 4 มิ.ย. 2024
  • A good language is not bloated with features. It is based on a handful of simple ideas, that - mixed together - unleash an incredible power. Modern programming concepts is thus much more than putting things on top of existing things without having the big picture in mind. Learn how some simple concepts like infix notation, currying, partial application and type inference play together, and leverage unknown potential. No matter if you are familiar with imperative or multi-paradigm languages: All you learn here can be used in JavaScript, TypeScript, and even C#.
    Open a door, take some new steps, and breath some fresh air. Don't worry: You can always go back where you came from...
    TRY
    ===
    In VSCode, install the Ionide extension for F#, create a new ".fsx" file, and start playing!
    Links
    ===
    Scott Wlaschin: "Pipeline Oriented Programming":
    • Pipeline-oriented prog...
    Socials
    ======
    Twitter / X: / schlenkr
    GitHub: github.com/SchlenkR
    Threads: threads.net/@schlenkr.dev
    👉 Don't forget to like, share, and subscribe for more content on modern programming concepts. Drop your questions and feedback in the comments section below and join our growing community of innovative programmers!
    ===
    #csharp #dotnet #functionalProgramming #functionalCSharp #fsharp #dotnetconf #csharptutorial #csharpprogramming #typescript
  • วิทยาศาสตร์และเทคโนโลยี

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

  • @lemosep.-kd5yr
    @lemosep.-kd5yr 3 หลายเดือนก่อน +23

    TH-cam randomly recommended me this. I love it.

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

      Glad you love it! It's always a benefit to learn F# I'd say, and to dig into the concepts behind it.

    • @TheRhopsody
      @TheRhopsody 3 หลายเดือนก่อน +1

      Same here :D

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

      Exactly the crisp and clear presentation that I like - no background music or annoyances, just well-spoken expert imparting his knowledge with perfect audio and superb visuals. And a nice coat!

  • @GdeVseSvobodnyeNiki
    @GdeVseSvobodnyeNiki 3 หลายเดือนก่อน +5

    Scott Wlaschin made huge influence on developers. A lot of functional bros are mentioning him in their videos.
    I finally started to understand how it all sticks together in a functional world thanks to his videos.

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

      Scott Wlaschin is King! Deep respect for all of his work, and a definite recommendation.

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

    I love when I find a great channel and I'm one of the first 1000 subs. And thanks to this particular video, I'll be able to speak enthusiastically at length about curried functions if an interviewer tries to stump me.

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

    2:05 Edit: I pretty much describe what's next in the video... Was coincidental enough (as I don't do F# at all) and funny to me that I kept the comment up.
    This reminds me how much I like the C# way, which is operator overloading. Its limits as an object-oriented language can be felt in the way it's done at the class level, but you could imagine that concept used more closely to the functional way.
    An ideal functional implementation of this in my opinion would allow you to define operators just like you'd define a variable, then use it just like any operator. Reusing the example, you could imagine something like that:
    let (+) = appendString
    let example = 2 + 3

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

    THIS IS SOOOO GOOD!! please make more

  • @kacperkwasny3848
    @kacperkwasny3848 3 หลายเดือนก่อน +1

    You've earned a subscriber ;D Can't wait for upcoming videos

  • @daymannovaes
    @daymannovaes 3 หลายเดือนก่อน +1

    oh that's a really well made video, 10/10! Thanks for creating it.

  • @codeman99-dev
    @codeman99-dev 3 หลายเดือนก่อน +1

    F# is the language that just makes sense. I only wish that interop with the .NET family were easier.

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

      Easier interop in which way - which direction - which field?

    • @codeman99-dev
      @codeman99-dev 3 หลายเดือนก่อน

      @@ThePureState Specifically, using a C# library in F#. I don't really remember the pain points at the moment to be honest - this was at a past employer and it has nearly been a year.

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

      @@codeman99-dev Give it a try - my experience is a really good one - especially for C# -> F# interop.

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

    I don't really use functional programming but I got this video recommended and man I'm so happy I decided to watch it. Love the content man! Always great to see some problems through other PoV like the ones functional programming offers :D

    • @ThePureState
      @ThePureState  3 หลายเดือนก่อน +1

      Happy to hear that you find it valuable, and have fun trying it out.

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

    Finally someone talking about piping in programming language like typescript ! Thanks for this useful video👍

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

    lovely dude! subbed.

  • @jongeduard
    @jongeduard 3 หลายเดือนก่อน +1

    I just came across this video, but really great explanation and makes a couple of things clear! Because I have actually done some things with F# and I know I noticed how I could pass one parameter left of the pipe operator, while I could place other parameters still right of a function which I using. But I did not really know about the actual theory behind this, and now I do. So thanks a lot for that!
    Professionally I work with C# mostly, but actually I touch in many languages, especially also Rust, which regardless of very different syntax is also inspired by the OCaml, ML and friends, from which F# is a direct derivative by the way, with a very similar syntax.

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

      Poking your nose into new things can only be valuable - even if it just means rethinking your habits and daily work. F# is a very practical language, with full access to all .Net libs, great tooling in VSCode (Ionide), Visual Studio and Rider. It's mature, performant, compiles also to JS, and for me, it's the choice for "getting things done".

  • @trubiso
    @trubiso 3 หลายเดือนก่อน +1

    incredible video, you deserve way more subs :)

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

    Happy the plant is back!

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

      But the form follows function - (in that case: content)

  • @anon_y_mousse
    @anon_y_mousse 3 หลายเดือนก่อน +1

    Personally, I find that one of the more annoying aspects of most functional programming languages is the syntax. Partly it's that they use a bunch of symbols in ways that only make sense for functional languages, and partly it's the placement of terms. In my opinion, the best language to really demonstrate functional concepts would be LISP. The overuse of parentheses is really annoying but it's incredibly simple to understand due to the form that it takes on. Of course, I'd rather use brackets than parentheses, but mostly because they're easier to type, and the shape of them appeals to my OCD. Though, the fact that they would make sense as the symbol for a "list" of objects doesn't hurt.

    • @ThePureState
      @ThePureState  3 หลายเดือนก่อน +1

      LISP is of course a thing on it's own :) In F#, there aren't many operators to be known (less than in imperative languages I'd say), and although it's possible to define a bunch of custom operators, I wouldn't recommend that, and I don't know many libraries that make use of it - maybe Saturn for composing web parts, or Parsec-like libraries like FParsec, where it's an important part of the vocabulary one has to learn, are exceptions that I use in my work.

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

      @@ThePureState What all do you use F# for, and do you use it for fun too?

    • @ThePureState
      @ThePureState  3 หลายเดือนก่อน +1

      I use it for almost everything: For my clients, BE + FE (Transpiled to JS using Fable), fun projects, embedded and IOT stuff, and so on...

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

      @@ThePureState Are any of those fun projects games? If so, do you write things from scratch or do you have a specific toolkit/engine that you use?

    • @ThePureState
      @ThePureState  3 หลายเดือนก่อน +1

      @@anon_y_mousse Ah, that you mean with "fun" projects :) I'm not really into games, but you can use F# with Unity and Godot somehow, or Monogame for 2D, or ... You can ask in the unofficial F# Discord server.

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

    Beautiful language F#. Too bad there are no job offers in this language, so it's just a curiosity ;(

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

    It doesn't make sense to say "that's not a problem AT ALL" and then "here's how we fix it".

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

    this is a reminder that javascript is just lisp

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

      Hmm, funny that you mention Lisp! Because if I am right Lisp does not use infix notation. It's quite an old language I know, with lots of dialects.
      Really old calculators in the past also used prefix. Infix came later.
      I would not really call it like JS though, unless you look at the deep level of nesting how some people code. 🤐

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

      Propably LISP-inspired? In case you have a lot of time, there's a HOPL paper for JS: dl.acm.org/doi/pdf/10.1145/3386327