Тёмный

Monoid Design Pattern (C#) 

Raw Coding
Подписаться 71 тыс.
Просмотров 5 тыс.
50% 1

Explanation of the Monoids concept in C#. Monoid is combination of things to build bigger things. The mechanism in which objects/functions/values get combined is up to the Monoid implementation.
Patreon 🤝 / raw_coding
Courses 📚 learning.raw-coding.dev
Shop 🛒 shop.raw-coding.dev
Discord 💬 / discord
Twitter 📣 / anton_t0shik
Twitch 🎥 / raw_coding
Playlist: • c# design patterns
Source: github.com/raw-coding-youtube...
#csharp #monoid #designpatterns

Опубликовано:

 

6 июн 2021

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 25   
@quantum634
@quantum634 2 года назад
I dont see how this is useable when writing code hmmm 😑 A real example would have been cool
@RawCoding
@RawCoding 2 года назад
agree, the time to write up a good example takes more time than explaining the concept. Maybe one day you'll discover this pattern in your work. Here's a good example in haskell ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-BovTQeDK7XI.html he basically concatenates (adds) a list of predicates which in turn returns a predicate, so the example I showed is how to combine any functions together in haskell you get out of the box tools to glue functions together. But basically he creates a single predicate out of many predicates and that serves as text filtering. the point about the avarage javascript code is the fact that boolean conditions written like that require a code change to update, when you work against an array of functions that's a swing in the direction of depending on data and being able to update things dynamically rather than having to do code changes.
@pmcgee003
@pmcgee003 Месяц назад
There is an awesome talk by Ben Deane. Monoids are literally everywhere. DB updates, string concatenation, integer addition, vector addition, multiple INI files, ... ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-INnattuluiM.html
@J-Kimble
@J-Kimble 3 года назад
Yes!! Just learning about monoids in functional programming.
@RawCoding
@RawCoding 3 года назад
Nice!
@g3ff01
@g3ff01 Месяц назад
The first part of the video was nice and clear, but the second part was confusing and hard to follow. The first confusing thing for me, was that I though that "int Add5(int a) => a + 5;" was itself a mondoid with the set of integers, while it is not, as it is not even a binary operation. Then for the second watch it started to become clearer that the monoid here would be the general concept of combining integer binary operations or something like that. However, that was a bit too much for 1 video in my opinion. There was a lot of not so used syntax and stuff used for a regular (OO) C# programmer (Func, generics, operator overloading, lambda expressions used to combine functions + the whole new mathematical concept... It was a bit too much for me (and I am not even a junior programmer, at least I don't consider myself as one already).
@mariomorazan9473
@mariomorazan9473 3 года назад
Love your videos man!!!!!!!!!
@RawCoding
@RawCoding 3 года назад
Cheers)
@dudu2891
@dudu2891 Год назад
This video is gold
@RawCoding
@RawCoding Год назад
Glad you enjoyed it!
@dkorobov
@dkorobov 2 года назад
This might be a good extension for the middleware where some function could be a sum of functions for “parallel” execution.
@RawCoding
@RawCoding 2 года назад
Yup
@viktorhh
@viktorhh 3 года назад
I would love to see a continuation to this series, with patterns displaying how you can implement custom map, bind, return, apply, with relevant examples. Any such plans? Thanks!
@RawCoding
@RawCoding 3 года назад
That’s up next, unfortunately no operator overloading for that
@viktorhh
@viktorhh 3 года назад
@@RawCoding So I've watched your Monad Pattern video now, great introduction! Would love to see more concrete examples on the subject since it's unavoidably abstract in nature. Any thoughts on continuing the FP track, perhaps just the basics? Also, you missed an easy win in this Monoid Pattern video: using Linqs Aggregate() which takes a monoidal operation. You could have made a list of your Function, and then Aggregate. Anyways, please keep the great content coming! I also have a final wish/request in case you take those.. compound patterns. I.e. examples of many design patterns used together, would be greatly appreciated! Thanks 😁
@RawCoding
@RawCoding 3 года назад
Thanks yeah the aggregate would be cool to show I just didn’t want to deviate from the idea. I can cover compound patterns but generally if you look at frameworks you’ll find them there.
@FXK23
@FXK23 2 года назад
Thanks so much that was great, just coding along makes it easier to understand. Would be nice, If we could select '.' as composition operator in c#
@RawCoding
@RawCoding 2 года назад
Ye operator overloading in c# is not very flexible
@sunnypatel1045
@sunnypatel1045 3 года назад
My guy!!! Will you be doing more functional programming tutorials? Or maybe doing a video on building another restful app maybe with a cloud service like azure?
@RawCoding
@RawCoding 3 года назад
I want to do Clojure tutorials at some point in the future
@cocoscacao6102
@cocoscacao6102 3 года назад
@@RawCoding Why not an F# video? This video really surprised me :)
@RawCoding
@RawCoding 3 года назад
Because I don’t know f# and Clojure had one of the biggest impacts on my skills
@cocoscacao6102
@cocoscacao6102 3 года назад
@@RawCoding Fair enough. Wrong assumption since your videos are .Net realm... Keep on with interesting content. Functional subjects are rare
@sunnypatel1045
@sunnypatel1045 3 года назад
@@RawCoding Agree tbh F# is more functional and C# is currently adopting it. Clojure is too one of many skills I need to understand. Looking forward to your videos dude and keep up the good work!
@nyendwa
@nyendwa Год назад
The link to your discoord channel is broken
Далее
Monad Design Pattern (C#)
20:07
Просмотров 11 тыс.
Proxy/Ambassador Design Pattern (C#, Microservices)
13:09
ЧУТЬ НЕ УТОНУЛ #shorts
00:27
Просмотров 6 млн
How Monoids are useful in Programming?
9:24
Просмотров 46 тыс.
What is a monoid? | #SoME1
8:46
Просмотров 8 тыс.
5 Design Patterns Every Engineer Should Know
11:51
Просмотров 935 тыс.
What the Heck Are Monads?!
21:08
Просмотров 69 тыс.
6 Levels of Thinking Every Student MUST Master
17:12
Просмотров 1,2 млн
Singleton Design Pattern (C#, Microservices)
15:22
Просмотров 13 тыс.
Visitor Design Pattern (C#)
8:37
Просмотров 9 тыс.
How to use Discriminated Unions Today in C#
17:09
Просмотров 59 тыс.
Prototype Design Pattern (C#)
12:30
Просмотров 16 тыс.