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. Back to C#.

Back to C#.

Scheduled Pinned Locked Moved The Lounge
csharpc++
36 Posts 20 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.
  • A AspDotNetDev

    Going "back to C#" would be a bit like going "back to the future", eh? :-D

    Nemanja Trifunovic wrote:

    view states

    It's good that ASP.Net automatically manages that for you, and allows you to customize it, eh?

    Nemanja Trifunovic wrote:

    postbacks

    Or you could use AJAX. Or just JavaScript. Or Silverlight (using C# and, if necessary, web services). Or not develop for the web.

    Nemanja Trifunovic wrote:

    properties

    Which now have a short syntax, and which also allow you to modify a DLL to add functionality later (e.g., if you decide you want to grab a value from the web.config rather than a private constant member) without having to change the code that relies on it. A nifty feature, IMO.

    Nemanja Trifunovic wrote:

    dispose patterns

    Yeah, pointers and manual memory management were so much more "fun".

    Nemanja Trifunovic wrote:

    vim for editing code

    Nemanja Trifunovic wrote:

    I ran away from C# and got back to real programming some five years ago, and have been happy ever since.

    I guess some people just like a challenge. You seem like just the type of person who would enjoy QuickBasic 4.5 with some inline machine code. That way, you get a crappy editor AND you can program for one of the hardest possible languages to use. ;)

    [Forum Guidelines]

    N Offline
    N Offline
    Nemanja Trifunovic
    wrote on last edited by
    #16

    aspdotnetdev wrote:

    eh?

    Meh. Btw - it was not me who downvoted your post.

    utf8-cpp

    modified on Wednesday, September 22, 2010 3:17 PM

    1 Reply Last reply
    0
    • N Nemanja Trifunovic

      I ran away from C# and got back to real programming some five years ago, and have been happy ever since. Today I found out I was assigned on a C# web project. Welcome back view states, postbacks, properties, dispose patterns and other "joys" I hoped I would never see again :) On the bright side, I can still use vim for editing code.

      utf8-cpp

      C Offline
      C Offline
      CPallini
      wrote on last edited by
      #17

      I'm happy with Lua and C at the moment. I've already the moon, so no regrets for the discarded OOP. :rolleyes:

      If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
      This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
      [My articles]

      1 Reply Last reply
      0
      • L Lost User

        What's wrong with properties? I'm glad I don't have to do that silly verbose get/set thing anymore..

        S Offline
        S Offline
        Shog9 0
        wrote on last edited by
        #18

        If you use public member data (er, "fields") you don't have to do the get/set thing regardless...

        L 1 Reply Last reply
        0
        • S Shog9 0

          If you use public member data (er, "fields") you don't have to do the get/set thing regardless...

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

          I don't know.. I thought that was against some Holy Design Rule? :)

          1 Reply Last reply
          0
          • N Nemanja Trifunovic

            harold aptroot wrote:

            silly verbose get/set thing anymore..

            Properties are just a little less verbose but still silly get/set things that look like member fields even if they are really methods.

            utf8-cpp

            T Offline
            T Offline
            tec goblin
            wrote on last edited by
            #20

            You are the first person I've ever seen don't liking Properties. They are syntactic sugar but they make the code concise and understandable. Yes they are methods, you know they are, they start with a capital letter, but what's the problem about that?

            P 1 Reply Last reply
            0
            • N Nemanja Trifunovic

              I ran away from C# and got back to real programming some five years ago, and have been happy ever since. Today I found out I was assigned on a C# web project. Welcome back view states, postbacks, properties, dispose patterns and other "joys" I hoped I would never see again :) On the bright side, I can still use vim for editing code.

              utf8-cpp

              T Offline
              T Offline
              tec goblin
              wrote on last edited by
              #21

              Wait, what's your problem about dispose patterns?

              1 Reply Last reply
              0
              • N Nemanja Trifunovic

                Todd Smith wrote:

                Convert it to ASP.NET MVC

                Not a very realistic option for such a big project, even if it was up to me to decide, which is not :)

                utf8-cpp

                T Offline
                T Offline
                tec goblin
                wrote on last edited by
                #22

                I definetely don't see why.

                1 Reply Last reply
                0
                • N Nemanja Trifunovic

                  Mladen Jankovic wrote:

                  don't blame C# for everything.

                  Yes - strictly speaking I should blame ASP.NET web forms for those, but the fact remains I never see them when programming with some other language (VB does not qualify as "other").

                  utf8-cpp

                  T Offline
                  T Offline
                  tec goblin
                  wrote on last edited by
                  #23

                  Try Salesforce and APEX. It is java-like, with the most bugful studio I've ever seen and it heavily uses the view state. It's slow and its CHEAT SHEET of platform limitations (in terms of number of queries etc) is 9 pages long.

                  1 Reply Last reply
                  0
                  • N Nemanja Trifunovic

                    I ran away from C# and got back to real programming some five years ago, and have been happy ever since. Today I found out I was assigned on a C# web project. Welcome back view states, postbacks, properties, dispose patterns and other "joys" I hoped I would never see again :) On the bright side, I can still use vim for editing code.

                    utf8-cpp

                    M Offline
                    M Offline
                    Machaira
                    wrote on last edited by
                    #24

                    Nemanja Trifunovic wrote:

                    I ran away from C# and got back to real programming

                    I stopped reading after this. X| :thumbsdown:

                    G 1 Reply Last reply
                    0
                    • M Machaira

                      Nemanja Trifunovic wrote:

                      I ran away from C# and got back to real programming

                      I stopped reading after this. X| :thumbsdown:

                      G Offline
                      G Offline
                      glennPattonWork3
                      wrote on last edited by
                      #25

                      I jumped at C# as a way to get shot of VB but some of it does make me for the shear simplicity of ANSI C which I still have to for Microcontrollers and some low level work on processor. The biggest pain I find is the lack of '&' for referencing type. For sheer speed I will still tryout something in VB and then rewrite it in C#. What are the main issues (other than it's not C++), why is it not real programming, just interested thats all! Glenn

                      A 1 Reply Last reply
                      0
                      • N Nemanja Trifunovic

                        I ran away from C# and got back to real programming some five years ago, and have been happy ever since. Today I found out I was assigned on a C# web project. Welcome back view states, postbacks, properties, dispose patterns and other "joys" I hoped I would never see again :) On the bright side, I can still use vim for editing code.

                        utf8-cpp

                        M Offline
                        M Offline
                        Michael Kingsford Gray
                        wrote on last edited by
                        #26

                        Wow! An actual Troglodyte!

                        G A 2 Replies Last reply
                        0
                        • N Nemanja Trifunovic

                          Todd Smith wrote:

                          Convert it to ASP.NET MVC

                          Not a very realistic option for such a big project, even if it was up to me to decide, which is not :)

                          utf8-cpp

                          E Offline
                          E Offline
                          Ed K
                          wrote on last edited by
                          #27

                          Why??

                          ed ~"Watch your thoughts; they become your words. Watch your words they become your actions. Watch your actions; they become your habits. Watch your habits; they become your character. Watch your character; it becomes your destiny." -Frank Outlaw.

                          1 Reply Last reply
                          0
                          • M Michael Kingsford Gray

                            Wow! An actual Troglodyte!

                            G Offline
                            G Offline
                            glennPattonWork3
                            wrote on last edited by
                            #28

                            Wot Me?

                            1 Reply Last reply
                            0
                            • N Nemanja Trifunovic

                              I ran away from C# and got back to real programming some five years ago, and have been happy ever since. Today I found out I was assigned on a C# web project. Welcome back view states, postbacks, properties, dispose patterns and other "joys" I hoped I would never see again :) On the bright side, I can still use vim for editing code.

                              utf8-cpp

                              E Offline
                              E Offline
                              englebart
                              wrote on last edited by
                              #29

                              Would that fit the dotNet-ish aspect but simplify things?

                              1 Reply Last reply
                              0
                              • G glennPattonWork3

                                I jumped at C# as a way to get shot of VB but some of it does make me for the shear simplicity of ANSI C which I still have to for Microcontrollers and some low level work on processor. The biggest pain I find is the lack of '&' for referencing type. For sheer speed I will still tryout something in VB and then rewrite it in C#. What are the main issues (other than it's not C++), why is it not real programming, just interested thats all! Glenn

                                A Offline
                                A Offline
                                AspDotNetDev
                                wrote on last edited by
                                #30

                                glennPattonWork wrote:

                                What are the main issues (other than it's not C++), why is it not real programming, just interested thats all!

                                Shouldn't you have asked the OP that?

                                glennPattonWork wrote:

                                The biggest pain I find is the lack of '&' for referencing type

                                Are you talking about C#? Everything in C# is basically passed by reference (more like passed by pointer). You can also use the ref keyword to pass things into functions and allow the function to set the value of that variable. You can also use the out keyword, which has a similar but slightly different purpose.

                                [Forum Guidelines]

                                1 Reply Last reply
                                0
                                • M Michael Kingsford Gray

                                  Wow! An actual Troglodyte!

                                  A Offline
                                  A Offline
                                  AspDotNetDev
                                  wrote on last edited by
                                  #31

                                  Michael K Gray wrote:

                                  Troglodyte

                                  At first, I thought you were saying "troglobyte". Didn't know this word. :thumbsup:

                                  [Forum Guidelines]

                                  G 1 Reply Last reply
                                  0
                                  • A AspDotNetDev

                                    Michael K Gray wrote:

                                    Troglodyte

                                    At first, I thought you were saying "troglobyte". Didn't know this word. :thumbsup:

                                    [Forum Guidelines]

                                    G Offline
                                    G Offline
                                    glennPattonWork3
                                    wrote on last edited by
                                    #32

                                    Troglobyte Cool! that pretty much sums me up as a coder, mind you I'm only a Windows coder as I wasn't at the meeting when the last guy we had ran screaming from the building! Give IC's, Resistors, Capacitors & Inductors; I'm a hardware guy really! So I propose the following definition "Troglobyte: Coder who gets lumbered with a job nobody else will do & Skill set that needs updating" Any views! Glenn

                                    1 Reply Last reply
                                    0
                                    • T tec goblin

                                      You are the first person I've ever seen don't liking Properties. They are syntactic sugar but they make the code concise and understandable. Yes they are methods, you know they are, they start with a capital letter, but what's the problem about that?

                                      P Offline
                                      P Offline
                                      Pete Appleton
                                      wrote on last edited by
                                      #33

                                      I don't like properties either - syntactic sugar for functions. And don't get me started on "automatic" properties... let's execute all of the mechanics of calling a function, but don't let the programmer do any work in it :doh:. The rationale of "don't expose fields" was so that any business logic can be encapsulated in the property get/set functions - but automatic properties might as well be a public field and a block of NOP's

                                      -- What's a signature?

                                      T 1 Reply Last reply
                                      0
                                      • P Pete Appleton

                                        I don't like properties either - syntactic sugar for functions. And don't get me started on "automatic" properties... let's execute all of the mechanics of calling a function, but don't let the programmer do any work in it :doh:. The rationale of "don't expose fields" was so that any business logic can be encapsulated in the property get/set functions - but automatic properties might as well be a public field and a block of NOP's

                                        -- What's a signature?

                                        T Offline
                                        T Offline
                                        tec goblin
                                        wrote on last edited by
                                        #34

                                        No. Automatic properties can have annotations that variables do not. Automatic properties can be used by frameworks in ways variables are not. You just haven't used C# (or java for that matter) enough to see the gains. Try data annotations and silverlight validation, for example.

                                        P 1 Reply Last reply
                                        0
                                        • T tec goblin

                                          No. Automatic properties can have annotations that variables do not. Automatic properties can be used by frameworks in ways variables are not. You just haven't used C# (or java for that matter) enough to see the gains. Try data annotations and silverlight validation, for example.

                                          P Offline
                                          P Offline
                                          Pete Appleton
                                          wrote on last edited by
                                          #35

                                          Damn, I've been using C# full-time since 1.0 beta back in 2001 and still haven't used it enough to understand, eh? How many LoC's do I have to write before I see?? I'm well aware that many of the decorations can only be applied to properties, but that's a restriction stemming from the initial design rather than a technical one; many attributes can be applied at a field level rather than property, and could quite easily be checked using a either a FieldInfo or a PropertyInfo. The fact that a different design decision was made in some frameworks to use AttributeTargets.Property instead of AttributeTargets.Property|AttributeTargets.Field doesn't alter the underlying fact that the automatic property is wasteful. Of course, whether it's actually noticeable is a different issue!

                                          -- What's a signature?

                                          T 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