Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
B

BRUNO S M

@BRUNO S M
About
Posts
1
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • C++ with automatic garbage collection = C#
    B BRUNO S M

    Well, I tend to disagree on your point. You could use yield for adding power to C# that is not there in C++. Like LINQ capabilities, it's the support for a functional operator called "call-cc" (Call Current continuation), available in SCHEME a functional language. Suppose you need to traverse a tree and do something with it (print it in-order for instance). You could use a producer-consumer paradigm that keeps the function-stack low, thus memory use is reduced, but otherwise you have a very simple code to read. Something like: delegate ProducerFn; delegate ConsumerFn; public bool Producer(TreeNode t, delegate ConsumerFn) { foreach(TreeNode childNone in t.ChildNodes) { return yield ConsumerFn(t.left, Producer); } } public void Consumer(TreeNode t, delegate ProducerFn) { string str = String.Format(t.ToString()); yield ProducerFn(t, Consumer); } Well since this code will not work (yet) you only get the idea, but I will complete it later on. However, there's a good article for using yield at MSDN which you can see at the Visual Studio IDE as a suggested articles. If you execute and step over it, you may see these advantages. "If All you have is an hammer everything looks like a nail." -BARUCH's OBSERVATION, Murphy law bpsm74@sapo.pt

    The Lounge question csharp c++ performance
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups