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
  1. Home
  2. The Lounge
  3. Using IEnumerable nonsense for everything

Using IEnumerable nonsense for everything

Scheduled Pinned Locked Moved The Lounge
questioncsharp
124 Posts 41 Posters 6 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Herbie Mountjoy

    Linq => Backward SQL

    We're philosophical about power outages here. A.C. come, A.C. go.

    R Offline
    R Offline
    Rob Grainger
    wrote on last edited by
    #121

    Actually, I think of it as SQL the right way round. A good clue comes from intellisense. It cannot get the field names unless you write the FROM before the SELECT.

    "If you don't fail at least 90 percent of the time, you're not aiming high enough." Alan Kay.

    1 Reply Last reply
    0
    • J James Curran

      But then, what about library functions? Are you going to inline every call to ToUpper() or Trim()? If you do, you have a unmanageable mess. If you don't, then you're back to the costs of jumps and stack management, so what's a few more?

      Truth, James

      M Offline
      M Offline
      Mike Marynowski
      wrote on last edited by
      #122

      "What's a few more" is often significant overhead. I don't know what argument you think I'm making. The comment that is the topic of my comments simply said that writing your code in a big main function is faster that all this object oriented stuff but probably a bad idea. I'm agreeing with that.

      1 Reply Last reply
      0
      • M Marc Clifton

        BillWoodruff wrote:

        I get a glimpse of your shadow going around a corner

        You are generous as always! There are some corners I probably should not be followed:

        public static bool If(this bool b, Action action)

        public static void IfElse(this bool b, Action ifTrue, Action ifFalse)

        etc. Let's just call those "experiments." :) Marc

        Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project! Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny

        R Offline
        R Offline
        Rob Grainger
        wrote on last edited by
        #123

        Is that a Smalltalk influence I detect? In Smalltalk, there are no control flow statements beyond sending messages. However, the boolean object responds to the messages ifTrue: and ifTrue:Else:

        (x < 3) ifTrue: [ x <- 3 ].
        (x < 3) ifTrue: [ x <- 3 ] Else: [ x <- x + 1 ].

        And of course similar constructs such as:

        (x > 0) whileTrue: [ x <- x - 1 ].

        Here [] denotes a block of code (similar to a closure) and <- denotes assignment.

        "If you don't fail at least 90 percent of the time, you're not aiming high enough." Alan Kay.

        1 Reply Last reply
        0
        • Sander RosselS Sander Rossel

          The newest thing? It has been around for almost 10 years... :~ The paradigm itself, readable, no side-effects code making heavy use of lambda's (or anonymous function) has been around almost as long as programming. It's called functional programming.

          Read my (free) ebook Object-Oriented Programming in C# Succinctly. Visit my blog at Sander's bits - Writing the code you need. Or read my articles here on CodeProject.

          Simplicity is prerequisite for reliability. — Edsger W. Dijkstra

          Regards, Sander

          R Offline
          R Offline
          Rob Grainger
          wrote on last edited by
          #124

          As LISP came out in 1958, it makes it a pretty old thing for programming. Venerable even.

          "If you don't fail at least 90 percent of the time, you're not aiming high enough." Alan Kay.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

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