Тёмный

Fast F#: Intro to Interfaces 

Fast F#
Подписаться 2,3 тыс.
Просмотров 831
50% 1

Interfaces allow us to abstract over the shape of types, and F# has excellent support for them. Here I'll show you how to define interfaces, implement them with Classes and Object Expressions, and use them in your code.
Blog Post: matthewcrews.c...
=== Contact ===
Email: hi@fastfsharp.com
Mastadon: mastodon.sdf.o...
Twitter: / fastfsharp
=== Tags ===
Tags: #fsharp, #dotnet

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

 

2 окт 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 16   
@JustinSkeen
@JustinSkeen Год назад
The last 2 lessons covers things that start to cross into how the F# is more "exposed" to the CLR but they also exist as concepts from the original contributing languages. Of all the interfaces that exist I do believe IEnumerable is foundational. It serves as the base layer to the collection interfaces and collections. As you touched upon in your video sometimes the compiler is aware enough to support a class that has an IEnumerable "signature" to it.
@FastFSharp
@FastFSharp Год назад
Yeah, the CLR does a bit of Duck Typing in specific and important scenarios. It's important to know about those since they are typically for performance reasons.
@thethreeheadedmonkey
@thethreeheadedmonkey Год назад
Love the effort you're putting into the content, but I'd also like you to put more effort into your tags, making sure you reach more users! As you described in other videos, to make a market where F# content is profitable, more users need to be enamoured with it - and to do that, they need to be introduced to it from relevant searches! I do of course realize that it's a lot less fun to figure out a few good tags for your content than to actually make it. But I think you'll be glad you did in the end.
@FastFSharp
@FastFSharp Год назад
How would you suggest searching for good tags to use?
@talwald1680
@talwald1680 Год назад
​@@FastFSharp look for similar content in python or c# and copy the tags from there. Also think of the newbe programmer who just heard a word and wants to learn more about it - what are those words? Etc.
@WillEhrendreich
@WillEhrendreich Год назад
Great content as always!
@IltayDev
@IltayDev Год назад
That idea about testing is great, I've never written tests usually I use fsi but If I want to start writing some tests this idea can be helpful because knowing things about ideas that I didn't think about it before can change the way I approach to programming and this channel was really helpful. Thank you
@XKS99
@XKS99 Год назад
Awesome
@talwald1680
@talwald1680 Год назад
Hi! So I think you could do a few things to reach more people! I really liked the intro! If you could record a 1 minute video summarizing the first 5 minutes and upload a short with a link to the full video could be a good "ad" for the channel. I personally love the long videos on the fast hashmap, but the introduction videos are to long for me to watch most of the time. I think you need to do some changes to the content length to make it less of an investment from the viewer to see a lot of the content - not all videos need to be 20 minutes long. I think up to 5 minute videos are most accessible, 10 minutes are less, and 20 minutes and above are least accessible. I'm not saying don't do long videos - I'm just saying match the content complexity and narrative to the content length. Also, if you could have most of the code written before you start the video and then only add the relevant code during the video - that could shorten the video length and also make it easier to follow. So for example, the first 5 minutes could be a seperate video with a really catchy name, and then point to this more elaborate introduction video. This video could have most of the code already written seperated to files by sub topic (basic interfaces, object expressions etc.). I think that would reduce a lot of the overhead of the video itself and make it more accessible to potential viewers.
@FastFSharp
@FastFSharp Год назад
I'll see what I can do. I'm not terribly worried about growing a large audience. I'm more interested in making that there is something out there for people to find when they search for content to learn F#.
@arunk4875
@arunk4875 Год назад
Very nice video, the for each part reminds me of the simplicity of Python. Are there other such cases in F#? Also can interfaces be defined using extension methods?
@FastFSharp
@FastFSharp Год назад
Not really sure what you're referring to when you say "other such cases in F#". Could you elaborate? I don't think interfaces can be defined using extensions but I also haven't tried...🤷
@arunk4875
@arunk4875 Год назад
@@FastFSharp Sorry I wasn't clear. I meant to ask if there are other examples you know of duck typing in F#
@FastFSharp
@FastFSharp Год назад
@@arunk4875 Oh! Not that I am aware of. There are some operators that are special and only working with certain data structures, List and :: for example. But that's not Duck Typing.
@WizardofWestmarch
@WizardofWestmarch Год назад
I'm glad you brought up the duck typing around stuff like foreach. I knew that but I find most people I ever mention it to go "Wuuuuuut?" It really is an important distinction. Sometimes I wonder what a language that allowed more duck typing at method boundaries would look like but monomorphized for versions per method instead of needing vtables.
@FastFSharp
@FastFSharp Год назад
I've been curious about that as well. I started playing around with a language idea that is statically duck typed.