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. What is your language feature wish list?

What is your language feature wish list?

Scheduled Pinned Locked Moved The Lounge
c++questioncsharpwpfai-coding
42 Posts 19 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.
  • H Offline
    H Offline
    honey the codewitch
    wrote on last edited by
    #1

    What languages, wishlists do you have for your favorite programming languages? C and where applicable, C++: preprocessor definitions that are private to the actual (in this case header) file they are contained in. namespaces that are private to their header. and/or a standard way to separate the implementation of templates into a cpp file a way to predeclare templates (not template instantiations) such that you can access them before they are defined. C#: Mainly I want its code generation to have DSL (domain specific language) capabilities. This means you can create code generation facilities that introduce new keywords into the language, for doing things like AOP and cross-cutting functionality orthogonal to any specific class. The only problem with it is I think it would be overused.

    To err is human. Fortune favors the monsters.

    D C S J P 13 Replies Last reply
    0
    • H honey the codewitch

      What languages, wishlists do you have for your favorite programming languages? C and where applicable, C++: preprocessor definitions that are private to the actual (in this case header) file they are contained in. namespaces that are private to their header. and/or a standard way to separate the implementation of templates into a cpp file a way to predeclare templates (not template instantiations) such that you can access them before they are defined. C#: Mainly I want its code generation to have DSL (domain specific language) capabilities. This means you can create code generation facilities that introduce new keywords into the language, for doing things like AOP and cross-cutting functionality orthogonal to any specific class. The only problem with it is I think it would be overused.

      To err is human. Fortune favors the monsters.

      D Offline
      D Offline
      Daniel Pfeffer
      wrote on last edited by
      #2

      Some of your desiderata can already be approximated in C++, at least.

      honey the codewitch wrote:

      preprocessor definitions that are private to the actual (in this case header) file they are contained in.

      With the exception of conditional compilation, I have little use for the preprocessor in C++. Defining an anonymous namespace inside a named namespace will allow scoping of C++ (not preprocessor) definitions even in a header file.

      honey the codewitch wrote:

      namespaces that are private to their header.

      You already have something close to this in C++ - define a namespace in the header with an anonymous internal namespace. Only functions declared in the (named) namespace may access the definitions in the anonymous namespace.

      namespace foo
      {
      namespace
      {
      int bar();
      }
      // bar() accessible here
      }
      // bar() not accessible here

      Freedom is the freedom to say that two plus two make four. If that is granted, all else follows. -- 6079 Smith W.

      H 1 Reply Last reply
      0
      • H honey the codewitch

        What languages, wishlists do you have for your favorite programming languages? C and where applicable, C++: preprocessor definitions that are private to the actual (in this case header) file they are contained in. namespaces that are private to their header. and/or a standard way to separate the implementation of templates into a cpp file a way to predeclare templates (not template instantiations) such that you can access them before they are defined. C#: Mainly I want its code generation to have DSL (domain specific language) capabilities. This means you can create code generation facilities that introduce new keywords into the language, for doing things like AOP and cross-cutting functionality orthogonal to any specific class. The only problem with it is I think it would be overused.

        To err is human. Fortune favors the monsters.

        C Offline
        C Offline
        Chris Maunder
        wrote on last edited by
        #3

        honey the codewitch wrote:

        you can create code generation facilities that introduce new keywords into the language

        This will be a nightmare for code maintenance. It's hard enough keeping code sensible so that any dev can step in and understand and safely maintain it, what with all the syntactic sugar being added. Allowing this to be non-standard and ad-hoc will just massively increase the surface area of confusion.

        cheers Chris Maunder

        1 Reply Last reply
        0
        • D Daniel Pfeffer

          Some of your desiderata can already be approximated in C++, at least.

          honey the codewitch wrote:

          preprocessor definitions that are private to the actual (in this case header) file they are contained in.

          With the exception of conditional compilation, I have little use for the preprocessor in C++. Defining an anonymous namespace inside a named namespace will allow scoping of C++ (not preprocessor) definitions even in a header file.

          honey the codewitch wrote:

          namespaces that are private to their header.

          You already have something close to this in C++ - define a namespace in the header with an anonymous internal namespace. Only functions declared in the (named) namespace may access the definitions in the anonymous namespace.

          namespace foo
          {
          namespace
          {
          int bar();
          }
          // bar() accessible here
          }
          // bar() not accessible here

          Freedom is the freedom to say that two plus two make four. If that is granted, all else follows. -- 6079 Smith W.

          H Offline
          H Offline
          honey the codewitch
          wrote on last edited by
          #4

          How did I not know about that? Thanks!

          To err is human. Fortune favors the monsters.

          1 Reply Last reply
          0
          • H honey the codewitch

            What languages, wishlists do you have for your favorite programming languages? C and where applicable, C++: preprocessor definitions that are private to the actual (in this case header) file they are contained in. namespaces that are private to their header. and/or a standard way to separate the implementation of templates into a cpp file a way to predeclare templates (not template instantiations) such that you can access them before they are defined. C#: Mainly I want its code generation to have DSL (domain specific language) capabilities. This means you can create code generation facilities that introduce new keywords into the language, for doing things like AOP and cross-cutting functionality orthogonal to any specific class. The only problem with it is I think it would be overused.

            To err is human. Fortune favors the monsters.

            S Offline
            S Offline
            Single Step Debugger
            wrote on last edited by
            #5

            In C# and C++ an "in" and "!in" operators. For example, if we have"

            if(var1 == param1 || var1 == param2 || !(var1 == param3))
            {
            //do stuff
            }

            to be able to translate to:

            if(var1 in (param1, param2, !param3))
            {
            //do stuff
            }

            Advertise here – minimum three posts per day are guaranteed.

            P M E 3 Replies Last reply
            0
            • H honey the codewitch

              What languages, wishlists do you have for your favorite programming languages? C and where applicable, C++: preprocessor definitions that are private to the actual (in this case header) file they are contained in. namespaces that are private to their header. and/or a standard way to separate the implementation of templates into a cpp file a way to predeclare templates (not template instantiations) such that you can access them before they are defined. C#: Mainly I want its code generation to have DSL (domain specific language) capabilities. This means you can create code generation facilities that introduce new keywords into the language, for doing things like AOP and cross-cutting functionality orthogonal to any specific class. The only problem with it is I think it would be overused.

              To err is human. Fortune favors the monsters.

              J Offline
              J Offline
              Jeremy Falcon
              wrote on last edited by
              #6

              honey the codewitch wrote:

              What languages, wishlists do you have for your favorite programming languages?

              My daily drivers are TypeScript/ECMAScript (JavaScript). Since JS is now governed by ECMA, having a committee behind it is a great thing for helping the language to continue to mature in a reasonable way. So, my wish has been answered. But, if I had to pick a wish-list for this ecosystem, it's less to do with the language and more to do with the developers. Despite this ecosystem finally starting to grow up, there are 10,000 packages to clip your toenails, for instance, and 99% of them aren't worth much. And despite the efforts of the language itself growing, due to the enormous popularity of JavaScript, there are still a ton of folks who pretend to know the language but are just script kiddies. For those wondering why I didn't say something like TypeScript to WASM compilation.... there's [already a project](https://www.assemblyscript.org/) that does that with a subset of TS suitable for this.

              Jeremy Falcon

              1 Reply Last reply
              0
              • S Single Step Debugger

                In C# and C++ an "in" and "!in" operators. For example, if we have"

                if(var1 == param1 || var1 == param2 || !(var1 == param3))
                {
                //do stuff
                }

                to be able to translate to:

                if(var1 in (param1, param2, !param3))
                {
                //do stuff
                }

                Advertise here – minimum three posts per day are guaranteed.

                P Offline
                P Offline
                PIEBALDconsult
                wrote on last edited by
                #7

                And an isnt operator, to avoid !( x is y ) ?

                J 1 Reply Last reply
                0
                • P PIEBALDconsult

                  And an isnt operator, to avoid !( x is y ) ?

                  J Offline
                  J Offline
                  Jeremy Falcon
                  wrote on last edited by
                  #8

                  Can we also have the redneck version called aint?

                  Jeremy Falcon

                  D R P G 4 Replies Last reply
                  0
                  • J Jeremy Falcon

                    Can we also have the redneck version called aint?

                    Jeremy Falcon

                    D Offline
                    D Offline
                    Daniel Pfeffer
                    wrote on last edited by
                    #9

                    How about the "aint not" operator? (Hillbilly?)

                    Freedom is the freedom to say that two plus two make four. If that is granted, all else follows. -- 6079 Smith W.

                    M 1 Reply Last reply
                    0
                    • J Jeremy Falcon

                      Can we also have the redneck version called aint?

                      Jeremy Falcon

                      R Offline
                      R Offline
                      Rick York
                      wrote on last edited by
                      #10

                      and for set inclusion, the all_yall function.

                      "They have a consciousness, they have a life, they have a soul! Damn you! Let the rabbits wear glasses! Save our brothers! Can I get an amen?"

                      J M 2 Replies Last reply
                      0
                      • R Rick York

                        and for set inclusion, the all_yall function.

                        "They have a consciousness, they have a life, they have a soul! Damn you! Let the rabbits wear glasses! Save our brothers! Can I get an amen?"

                        J Offline
                        J Offline
                        Jeremy Falcon
                        wrote on last edited by
                        #11

                        You totally read my mind. I want this. I need this.

                        if (var1 in all yall (param1, param2, !param3)) {
                        // all yall are modifiers that are compiler hints, like inline,
                        // to tell it to apply comparison optimizations if possible
                        }

                        Jeremy Falcon

                        1 Reply Last reply
                        0
                        • J Jeremy Falcon

                          Can we also have the redneck version called aint?

                          Jeremy Falcon

                          P Offline
                          P Offline
                          PIEBALDconsult
                          wrote on last edited by
                          #12

                          Well, let's not, else we may wind up with multiple inheritance problems.

                          J 1 Reply Last reply
                          0
                          • P PIEBALDconsult

                            Well, let's not, else we may wind up with multiple inheritance problems.

                            J Offline
                            J Offline
                            Jeremy Falcon
                            wrote on last edited by
                            #13

                            The coding interviews would be like... Can you explain a binary search family tree with no branches? :laugh: :laugh: :laugh:

                            Jeremy Falcon

                            D 1 Reply Last reply
                            0
                            • H honey the codewitch

                              What languages, wishlists do you have for your favorite programming languages? C and where applicable, C++: preprocessor definitions that are private to the actual (in this case header) file they are contained in. namespaces that are private to their header. and/or a standard way to separate the implementation of templates into a cpp file a way to predeclare templates (not template instantiations) such that you can access them before they are defined. C#: Mainly I want its code generation to have DSL (domain specific language) capabilities. This means you can create code generation facilities that introduce new keywords into the language, for doing things like AOP and cross-cutting functionality orthogonal to any specific class. The only problem with it is I think it would be overused.

                              To err is human. Fortune favors the monsters.

                              P Offline
                              P Offline
                              PIEBALDconsult
                              wrote on last edited by
                              #14

                              C# -- Multiple inheritance. And a C-Preprocessor which is more flexible, for use with things other than vanilla C. I've wanted this since doing PRO*C back in the 90s.

                              D 1 Reply Last reply
                              0
                              • D Daniel Pfeffer

                                How about the "aint not" operator? (Hillbilly?)

                                Freedom is the freedom to say that two plus two make four. If that is granted, all else follows. -- 6079 Smith W.

                                M Offline
                                M Offline
                                Mike Hankey
                                wrote on last edited by
                                #15

                                Daniel Pfeffer wrote:

                                How about the "aint not" operator?

                                That would be t'aint

                                PartsBin an Electronics Part Organizer - An updated version available! JaxCoder.com

                                J 1 Reply Last reply
                                0
                                • R Rick York

                                  and for set inclusion, the all_yall function.

                                  "They have a consciousness, they have a life, they have a soul! Damn you! Let the rabbits wear glasses! Save our brothers! Can I get an amen?"

                                  M Offline
                                  M Offline
                                  Mike Hankey
                                  wrote on last edited by
                                  #16

                                  for (hold_my_bear in watch_this) { }

                                  PartsBin an Electronics Part Organizer - An updated version available! JaxCoder.com

                                  1 Reply Last reply
                                  0
                                  • M Mike Hankey

                                    Daniel Pfeffer wrote:

                                    How about the "aint not" operator?

                                    That would be t'aint

                                    PartsBin an Electronics Part Organizer - An updated version available! JaxCoder.com

                                    J Offline
                                    J Offline
                                    jmaida
                                    wrote on last edited by
                                    #17

                                    I reckon so.

                                    "A little time, a little trouble, your better day" Badfinger

                                    1 Reply Last reply
                                    0
                                    • J Jeremy Falcon

                                      The coding interviews would be like... Can you explain a binary search family tree with no branches? :laugh: :laugh: :laugh:

                                      Jeremy Falcon

                                      D Offline
                                      D Offline
                                      Daniel Pfeffer
                                      wrote on last edited by
                                      #18

                                      Jeremy Falcon wrote:

                                      Can you explain a binary search family tree with no branches loops?

                                      FTFY :)

                                      Freedom is the freedom to say that two plus two make four. If that is granted, all else follows. -- 6079 Smith W.

                                      1 Reply Last reply
                                      0
                                      • P PIEBALDconsult

                                        C# -- Multiple inheritance. And a C-Preprocessor which is more flexible, for use with things other than vanilla C. I've wanted this since doing PRO*C back in the 90s.

                                        D Offline
                                        D Offline
                                        Daniel Pfeffer
                                        wrote on last edited by
                                        #19

                                        PIEBALDconsult wrote:

                                        C# -- Multiple inheritance.

                                        If you want C++, you have it. There were good reasons for including multiple inheritance in C++ at the time, and equally good reasons why C# and Java did not include it.

                                        PIEBALDconsult wrote:

                                        And a C-Preprocessor which is more flexible, for use with things other than vanilla C.

                                        Personally, I consider the C preprocessor in its current form to be poorly engineered. Because its definitions are global, the inclusion of a header file can totally change the semantics of a module. Yes, it has its uses, but on any large project it requires a lot of coordination to avoid definition clashes etc.

                                        Freedom is the freedom to say that two plus two make four. If that is granted, all else follows. -- 6079 Smith W.

                                        1 Reply Last reply
                                        0
                                        • H honey the codewitch

                                          What languages, wishlists do you have for your favorite programming languages? C and where applicable, C++: preprocessor definitions that are private to the actual (in this case header) file they are contained in. namespaces that are private to their header. and/or a standard way to separate the implementation of templates into a cpp file a way to predeclare templates (not template instantiations) such that you can access them before they are defined. C#: Mainly I want its code generation to have DSL (domain specific language) capabilities. This means you can create code generation facilities that introduce new keywords into the language, for doing things like AOP and cross-cutting functionality orthogonal to any specific class. The only problem with it is I think it would be overused.

                                          To err is human. Fortune favors the monsters.

                                          R Offline
                                          R Offline
                                          Roger Wright
                                          wrote on last edited by
                                          #20

                                          I'd like to have a language/IDE that can sense my mind, interpret what I want to accomplish, and generate the code required to fulfill my wish. Is that really too much to ask, in this era of AI domination?

                                          Will Rogers never met me.

                                          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