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. Short LINQ syntax

Short LINQ syntax

Scheduled Pinned Locked Moved The Lounge
csharplinqcomquestion
53 Posts 13 Posters 0 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.
  • OriginalGriffO OriginalGriff

    The bloke who wrote the article probably does. Me? I think there is enough confusion available in LINQ without needing extra compact stuff that looks like a regex - i.e. unreadable without a good long look.

    You looking for sympathy? You'll find it in the dictionary, between sympathomimetic and sympatric (Page 1788, if it helps)

    M Offline
    M Offline
    Mark_Wallace
    wrote on last edited by
    #21

    OriginalGriff wrote:

    Me? I think there is enough confusion available in LINQ without needing extra compact stuff that looks like a regex - i.e. unreadable without a good long look.

    It's like the rule 34 of coding: Within two years of its creation, a programming language that is easily usable will have been turned into a writhing mess of ridiculous complications. [edit] I typoed "writhing", fer cryin' out loud!

    I wanna be a eunuchs developer! Pass me a bread knife!

    1 Reply Last reply
    0
    • U User 10246491

      This approach refers to a Bitwise combinations syntax, precisely the opposite way of Natural Language. Regards

      M Offline
      M Offline
      Marc Clifton
      wrote on last edited by
      #22

      Member 10277067 wrote:

      This approach refers to a Bitwise combinations syntax,
      precisely the opposite way of Natural Language.

      I understand that, but the point of a natural language syntax is that it is readable, more or less, without an internal translation layer on the part of the reader. Like any syntax, it probably could become second nature (like how | is a bitwise OR and || is a logical OR), but I completely fail to see the advantage of using the syntax in your short LINQ examples. Marc

      Automating Semantic Mapping of a Document With Natural Language Processing

      1 Reply Last reply
      0
      • R Rage

        Some people do not understand sarcasm[^]. :rolleyes:

        ~RaGE();

        I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus Entropy isn't what it used to.

        OriginalGriffO Offline
        OriginalGriffO Offline
        OriginalGriff
        wrote on last edited by
        #23

        And then you get a sarchasm[^]

        You looking for sympathy? You'll find it in the dictionary, between sympathomimetic and sympatric (Page 1788, if it helps)

        "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
        "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

        1 Reply Last reply
        0
        • P PIEBALDconsult

          No; a developer must write as clearly as possible so that the next developer can think less. Effort "saved" up front often leads to greater effort later.

          M Offline
          M Offline
          Marc Clifton
          wrote on last edited by
          #24

          PIEBALDconsult wrote:

          No; a developer must write as clearly as possible so that the next developer can think less.

          Very well said! Marc

          Automating Semantic Mapping of a Document With Natural Language Processing

          1 Reply Last reply
          0
          • P PIEBALDconsult

            No; a developer must write as clearly as possible so that the next developer can think less. Effort "saved" up front often leads to greater effort later.

            OriginalGriffO Offline
            OriginalGriffO Offline
            OriginalGriff
            wrote on last edited by
            #25

            :thumbsup: At times like this, I wish I could hit the upvote button a couple of dozen times...

            You looking for sympathy? You'll find it in the dictionary, between sympathomimetic and sympatric (Page 1788, if it helps)

            "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
            "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

            U 1 Reply Last reply
            0
            • U User 10246491

              Hi, Tks for your reply. Why community currently uses JQuery in large scale ? THINK MORE. WRITE LESS ! ;-) Regards

              P Offline
              P Offline
              Pete OHanlon
              wrote on last edited by
              #26

              You aren't comparing like with like. jQuery serves a purpose - making DOM manipulation consistent across browsers. You might want to think more before you pick your analogies.

              U 1 Reply Last reply
              0
              • P PIEBALDconsult

                No; a developer must write as clearly as possible so that the next developer can think less. Effort "saved" up front often leads to greater effort later.

                U Offline
                U Offline
                User 10246491
                wrote on last edited by
                #27

                PIEBALDconsult Please, The issue here is the discussion of a new possible concept, we can discuss about best practices of coding in another post. :zzz: Read the things before show yourself to the readers ! Regards.

                P 1 Reply Last reply
                0
                • OriginalGriffO OriginalGriff

                  :thumbsup: At times like this, I wish I could hit the upvote button a couple of dozen times...

                  You looking for sympathy? You'll find it in the dictionary, between sympathomimetic and sympatric (Page 1788, if it helps)

                  U Offline
                  U Offline
                  User 10246491
                  wrote on last edited by
                  #28

                  I respect your point of view. Thank you!

                  1 Reply Last reply
                  0
                  • P Pete OHanlon

                    You aren't comparing like with like. jQuery serves a purpose - making DOM manipulation consistent across browsers. You might want to think more before you pick your analogies.

                    U Offline
                    U Offline
                    User 10246491
                    wrote on last edited by
                    #29

                    The slogan says itself : jQuery => Write Less, Do More ;-) The analogy was cited in this regard. Thanks for your comment.

                    P L S 3 Replies Last reply
                    0
                    • U User 10246491

                      The slogan says itself : jQuery => Write Less, Do More ;-) The analogy was cited in this regard. Thanks for your comment.

                      P Offline
                      P Offline
                      Pete OHanlon
                      wrote on last edited by
                      #30

                      Have you ever heard of an elevator pitch? You have a product that you're trying to get us interested in here. You have 60 seconds to tell us what problem you're trying to solve here and how it does it. Taking jQuery as an example - the problem is different browsers have different HTML implementations; jQuery provides a consistent API that works regardless of the underlying browser. That's an easy problem domain to define, and an easy solution to sell. What problem are you trying to solve? What can I not do today that this will solve for me?

                      U 1 Reply Last reply
                      0
                      • P Pete OHanlon

                        Have you ever heard of an elevator pitch? You have a product that you're trying to get us interested in here. You have 60 seconds to tell us what problem you're trying to solve here and how it does it. Taking jQuery as an example - the problem is different browsers have different HTML implementations; jQuery provides a consistent API that works regardless of the underlying browser. That's an easy problem domain to define, and an easy solution to sell. What problem are you trying to solve? What can I not do today that this will solve for me?

                        U Offline
                        U Offline
                        User 10246491
                        wrote on last edited by
                        #31

                        Did u read the Project proposal ? - Smart Data Mining - Flex Data Formats Interchange Cross Platforms And more... Are some of the problems that it solves. Read more please. Download the test console and then give your opinion :-) Thanks

                        P 1 Reply Last reply
                        0
                        • U User 10246491

                          Did u read the Project proposal ? - Smart Data Mining - Flex Data Formats Interchange Cross Platforms And more... Are some of the problems that it solves. Read more please. Download the test console and then give your opinion :-) Thanks

                          P Offline
                          P Offline
                          Pete OHanlon
                          wrote on last edited by
                          #32

                          I read your proposal and I watched the YouTube video. At the end of it I was no further forward. Throwing phrases like Flex Data Formats Interchange Cross Platforms tells me nothing. Seriously. Write your proposal in English, not technical shorthand. Your refusal to understand that we aren't going to just download a spam posting isn't doing you any favours. Tell you what. Why don't you write an article about this? This is, after all, what CodeProject is all about. If you write an article clearly showing what this solves, you might actually find that people are more receptive. Right now, you're winning no friends here.

                          P P U 3 Replies Last reply
                          0
                          • U User 10246491

                            The slogan says itself : jQuery => Write Less, Do More ;-) The analogy was cited in this regard. Thanks for your comment.

                            L Offline
                            L Offline
                            Lost User
                            wrote on last edited by
                            #33

                            The slogan does not mean that it should use as few characters as possible.

                            Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]

                            1 Reply Last reply
                            0
                            • U User 10246491

                              Anyone know this new short syntax method of LINQ queries ? http://bwqs.codeplex.com

                              S Offline
                              S Offline
                              StatementTerminator
                              wrote on last edited by
                              #34

                              I honestly don't see what this accomplishes other than obfuscation. This reminds me of why I learned to hate Perl: easy to write, a right pain to read and maintain. If a junior programmer can't understand the code within a few minutes, you're doing something terrible to the maintenance programmers, killing productivity and inviting bugs (and making enemies). Code that is opaque for no good reason is worse than no code at all.

                              L 1 Reply Last reply
                              0
                              • P PIEBALDconsult

                                No; a developer must write as clearly as possible so that the next developer can think less. Effort "saved" up front often leads to greater effort later.

                                F Offline
                                F Offline
                                Frank Alviani
                                wrote on last edited by
                                #35

                                Eloquently - and accurately - phrased!

                                According to my calculations, I should be able to retire about 5 years after I die.

                                1 Reply Last reply
                                0
                                • U User 10246491

                                  The slogan says itself : jQuery => Write Less, Do More ;-) The analogy was cited in this regard. Thanks for your comment.

                                  S Offline
                                  S Offline
                                  StatementTerminator
                                  wrote on last edited by
                                  #36

                                  Member 10277067 wrote:

                                  Write Less, Do More

                                  You keep using these words, I don't think they mean what you think they mean. JQuery allows us to write code that works across browsers, prior to that we had to write different versions of JavaScript for different browsers. JQuery also provides simple ways to do common tasks which would otherwise require a fair amount of JavaScript code. That's what the "write less" part means, it doesn't literally mean to make code as terse as possible. Typing is not a bottleneck in programming (unless you're doing it wrong).

                                  U 1 Reply Last reply
                                  0
                                  • S StatementTerminator

                                    I honestly don't see what this accomplishes other than obfuscation. This reminds me of why I learned to hate Perl: easy to write, a right pain to read and maintain. If a junior programmer can't understand the code within a few minutes, you're doing something terrible to the maintenance programmers, killing productivity and inviting bugs (and making enemies). Code that is opaque for no good reason is worse than no code at all.

                                    L Offline
                                    L Offline
                                    Lost User
                                    wrote on last edited by
                                    #37

                                    StatementTerminator wrote:

                                    If a junior programmer can't understand the code within a few minutes,

                                    Well we'd better stop writing any code then. Or the junior programmers you've met are smarter than the ones I've met. Give them something trivial and they struggle for hours.

                                    S 1 Reply Last reply
                                    0
                                    • L Lost User

                                      StatementTerminator wrote:

                                      If a junior programmer can't understand the code within a few minutes,

                                      Well we'd better stop writing any code then. Or the junior programmers you've met are smarter than the ones I've met. Give them something trivial and they struggle for hours.

                                      S Offline
                                      S Offline
                                      StatementTerminator
                                      wrote on last edited by
                                      #38

                                      For better or worse, junior programmers are often the maintenance programmers fixing the bugs, at least where I've worked. Granted, there's going to be some code that they need a senior programmer's help with now and again, but the code should be as transparent as possible. If you write code that is so clever that the maintenance programmers can't easily read it, then you'd better be willing to maintain it yourself or do a lot of hand-holding. Sometimes that's inevitable, but it shouldn't be done without good reason.

                                      P 1 Reply Last reply
                                      0
                                      • M Marc Clifton

                                        Yuck. Marc

                                        Automating Semantic Mapping of a Document With Natural Language Processing

                                        P Offline
                                        P Offline
                                        Paul Conrad
                                        wrote on last edited by
                                        #39

                                        Marc Clifton wrote:

                                        Yuck.

                                        I agree. when looking at the example, the readability went to hell. Not 100% sure what the example query was going to return as a result.

                                        "I've seen more information on a frickin' sticky note!" - Dave Kreskowiak

                                        1 Reply Last reply
                                        0
                                        • U User 10246491

                                          PIEBALDconsult Please, The issue here is the discussion of a new possible concept, we can discuss about best practices of coding in another post. :zzz: Read the things before show yourself to the readers ! Regards.

                                          P Offline
                                          P Offline
                                          Paul Conrad
                                          wrote on last edited by
                                          #40

                                          Member 10277067 wrote:

                                          discussion of a new possible concept

                                          Understandable.

                                          Member 10277067 wrote:

                                          discuss about best practices of coding in another post

                                          Not so. If a new concept does not adhere to good or best coding practices, then it will not make it very far since people will be less motivated to using it.

                                          "I've seen more information on a frickin' sticky note!" - Dave Kreskowiak

                                          U 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