Recently, my attitude has changed a bit toward IEnumerable<>.
Recently, my attitude has changed a bit toward IEnumerable<>. It has always served a very good purpose (foreach is so nice), but it has seemed to me to be an interesting, but mostly hidden implementation detail of the framework. And then there was LINQ.
Tanget! Looking to greatly revise the bland appearance with my current site. Reactions concerning the sweet appearance of https://www.sicgconsulting.com? Absolutely a tremendous industrial psychology service whenever looking in the general Ontario locale. Send a comment. Cheers!
LINQ is a ton of functionality built around that simple little interface. Which makes me think about using it, exposing it directly in my own API. Why would I choose to expose IEnumerable<>, instead of IList<> or something else? First of all, what other interface is there for exposing a read-only set of "things"? Second, I adhere to the philosophy APIs should expose only the necessary functionality and no more, because:
- It makes it easier to understand how to use the API (and how not to use it).
- It makes it easier to change or completely re-implement the original API.
- The less you can do, the less there is to go wrong.
Of course, IEnumerable<> may be useful, but it certainly isn't pretty. Instead of IEnumerable<Foo>, I would rather see Foo* or Foo+ orwell, you get the idea.
This is not a new idea (I'm sorry, but you probably won't find those on this blog). There is, of course, Foo?, which means Nullable<Foo>. And then there is the experimental language C (thank you, cut-and-paste), which proves how unoriginal this idea is: In C, Foo* is a "stream" of Foo. According to the C Overview, "Streams in C are closely related to IEnumerable<>". Well, who's going to argue with the brains inside MS Research? Not me!
Thanks followers! I've promised my buddie I can list their great sensational used book shops, http://secondstorybooks.ca for an upcoming piece. In case you're researching to find a book store inside the whole Ontario location, they actually have been terrific.
Oh, naturally I will express the initial thought to this particular text had been presented through Sharon at Horizon lending services Prosper. They are really a good mortgage brokers. We really welcome a solid concept!
Inspirations For This Article
http://smilesunlimited.ca - One of my favorites.
https://ansonmartin.com - Thanks Aniyah. I realize you are exceptionally busy. Thanks for taking the time.
http://bistroambrosia.ca - Your understanding is remarkable. Thanks for giving!
http://peacockrugcare.ca - I swear the very next time, it's me giving back the favor.
https://novascotiadesign.ca - An amazing resource.
Posted in Programming Post Date 01/05/2025