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.
  • 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
                  • 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.

                    N Offline
                    N Offline
                    Niels Holst
                    wrote on last edited by
                    #21

                    In R: A function that returns the path to where the R script was loaded from.

                    T 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.

                      M Offline
                      M Offline
                      Member 15672911
                      wrote on last edited by
                      #22

                      YES !!!! and as in : if (ch in [A..Z,0..9]) as it is in Pascal.

                      P 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
                        Cpichols
                        wrote on last edited by
                        #23

                        Not at all my favorite language, but I do wish that JavaScript could handle associative arrays (not objects) in foreach loops where keys and values could be easily accessed for each item in the array, and so that it could be done recursively. The workarounds for this are making me bug-eyed.

                        J 1 Reply Last reply
                        0
                        • J Jeremy Falcon

                          Can we also have the redneck version called aint?

                          Jeremy Falcon

                          G Offline
                          G Offline
                          Gary Wheeler
                          wrote on last edited by
                          #24

                          +10! :laugh:

                          Software Zen: delete this;

                          1 Reply Last reply
                          0
                          • M Member 15672911

                            YES !!!! and as in : if (ch in [A..Z,0..9]) as it is in Pascal.

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

                            I make a static Hashset for that (C#).

                            S T 2 Replies Last reply
                            0
                            • N Niels Holst

                              In R: A function that returns the path to where the R script was loaded from.

                              T Offline
                              T Offline
                              tronderen
                              wrote on last edited by
                              #26

                              Is that really a language feature? I suppose it could be useful, but it sounds more like a library/OS feature.

                              N 1 Reply Last reply
                              0
                              • P PIEBALDconsult

                                I make a static Hashset for that (C#).

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

                                That's cool. The build-in contains/subset functions are native and fast.

                                Advertise here – minimum three posts per day are guaranteed.

                                1 Reply Last reply
                                0
                                • P PIEBALDconsult

                                  I make a static Hashset for that (C#).

                                  T Offline
                                  T Offline
                                  tronderen
                                  wrote on last edited by
                                  #28

                                  Well, yes, but ... In all the Pascals I have been in touch with, it is implemented as a bit map. A few orders of magnitude lighter, I guess. There are several other Pascal features I certainly would welcome in C#. Such as decent enumerations, as a first class data type - not just symbolic names for integers, that cannot even be used as integers! In particular: The enum we are offered cannot even be used as an array index type. Closely related: I would welcome Pascal style subrange types. Define a type Year = 1900..2050, and assigning a value outside this range to a variable of type Year is caught by the runtime system (or the compiler, if it can be determined statically). Related to this: An array with index type Year, so valid index values run from 1900 to 2050. To go a little beyond Pascal: I wish we had a mechanism for defining incompatible types: If I could define 'new type Speed = float;' and 'new type Volume = float;', variables of type Speed and Volume would be incompatible, and the compiler would give an error if you try to add them (without a proper operator definition for the two types, or an explicit cast).

                                  P E 2 Replies Last reply
                                  0
                                  • T tronderen

                                    Is that really a language feature? I suppose it could be useful, but it sounds more like a library/OS feature.

                                    N Offline
                                    N Offline
                                    Niels Holst
                                    wrote on last edited by
                                    #29

                                    There are setwd(path) and getwd(path) functions for setting the working directory (i.e. the folder from which any relative path would be rooted) but there is no way of finding out from where a script was loaded. That makes it cumbersome to distribute R scripts as an assemblage (e.g. a zip file) of interconnected R scripts and data files. The user must be instructed to call setwd(path) in the beginning of the main script with the folder of her choice. The same goes for yourself when you move your assemblage of R files from one folder to another; you always need to update the setwd(path) statement as well.

                                    T 1 Reply Last reply
                                    0
                                    • T tronderen

                                      Well, yes, but ... In all the Pascals I have been in touch with, it is implemented as a bit map. A few orders of magnitude lighter, I guess. There are several other Pascal features I certainly would welcome in C#. Such as decent enumerations, as a first class data type - not just symbolic names for integers, that cannot even be used as integers! In particular: The enum we are offered cannot even be used as an array index type. Closely related: I would welcome Pascal style subrange types. Define a type Year = 1900..2050, and assigning a value outside this range to a variable of type Year is caught by the runtime system (or the compiler, if it can be determined statically). Related to this: An array with index type Year, so valid index values run from 1900 to 2050. To go a little beyond Pascal: I wish we had a mechanism for defining incompatible types: If I could define 'new type Speed = float;' and 'new type Volume = float;', variables of type Speed and Volume would be incompatible, and the compiler would give an error if you try to add them (without a proper operator definition for the two types, or an explicit cast).

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

                                      Oh, well, yeah, for individual (ASCII) characters a bitmap or similar may be best. I was thinking of a more general technique.   Edit: As in making a Hashset and putting various (UNICODE) quote characters or whitespace characters in it to test against. Yes, there are many things Pascal does which are handy. But I haven't used Pascal in decades, not since learning C.

                                      T 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.

                                        T Offline
                                        T Offline
                                        tronderen
                                        wrote on last edited by
                                        #31

                                        Loop enhancements: First iteration statements executed in loop context. An optional 'break code' added to a 'break', to indicate why a loop is prematurely terminated 'Handlers' that executes in the context of the loop, for each break code. 'finally', like in exception handling. E.g.:

                                        for (record r = head; r; r = r.next) {

                                        initloop: {
                                        int iterationCount = 0;
                                        record trailer = null;
                                        int accumulated = 0;
                                        }
                                        ...
                                        if (++iterationCount > limit) break : GivingUp;
                                        ...
                                        if (r.key == desiredKey) break : RecordFound;
                                        ...
                                        trailer = r;
                                        accumulated += r.value;

                                        exitbreak (GivingUp): {
                                        Console.WriteLine("Possible circular list: " + head.listname;
                                        Console.WriteLine("Giving up after " + iterationCount + " iterations");
                                        }

                                        exitbreak (RecordFound): { // process r, with access to loop local variables, e.g.
                                        if (trailer == null) head = r.next;
                                        else trailer.next = r.next;
                                        r.sumOfPreceding = accumulated;
                                        // save r on disk
                                        }

                                        exitloop: {
                                        Console.Writeline(desiredKey + " not found among " + iterationCount + " records");
                                        }

                                        finally: {
                                        }
                                        }

                                        This would keep all the action related to the loop as one syntactical unit. It would reduce variable clutter for reporting the loop termination, and termination actions would have access to variables relevant to the loop alone. The above actions, expressed without these enhancements, would require a handful of (loop) global variables, and the semantics would be spread out before the loop, in the loop and after the loop, not as one syntactical unit. Alternately, the loop body would have several if/else levels of nesting and it would be difficult to identify the exit actions as such.

                                        1 Reply Last reply
                                        0
                                        • P PIEBALDconsult

                                          Oh, well, yeah, for individual (ASCII) characters a bitmap or similar may be best. I was thinking of a more general technique.   Edit: As in making a Hashset and putting various (UNICODE) quote characters or whitespace characters in it to test against. Yes, there are many things Pascal does which are handy. But I haven't used Pascal in decades, not since learning C.

                                          T Offline
                                          T Offline
                                          tronderen
                                          wrote on last edited by
                                          #32

                                          Pascal had bitmaps as a first class type ('SET OF'), with operations for inserting and removing elements, intersection / union / difference operators and membership tests. I guess that the C code I have written for doing the same things were at least as efficient as the Pascal compiler could have done it (it probably would have added a lot of range tests), but I certainly have often missed the syntactic simplicity of Pascal for such operations!

                                          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