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. General Programming
  3. Design and Architecture
  4. Compiler/syntax checker with add-on functionality

Compiler/syntax checker with add-on functionality

Scheduled Pinned Locked Moved Design and Architecture
questionc++javadiscussionworkspace
9 Posts 4 Posters 8 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.
  • D Offline
    D Offline
    D4rkTrick
    wrote on last edited by
    #1

    Hi, I got the feeling, that new programming languages spread out of the earth like gras... or at least did so a while ago. I want to question the need of new languages here. Why don't we have just a couple of basic rules and build the "languages" on top of it like add-ons. So if you want the have a keyword X, you can just implement it as an add-on to the compiler. Why should that be necessary? I think if you want to start a project and would have a free choice over the language you use, you might get in a situation like this: - I want to use language X, but it's library is not that big - I want to use Java, but it's too heavy - I want to use x because it hast feature y - I need lightweight stuff, so I should use X, but it lacks features, syntactic sugar, already implemented patterns. I just came to think of that, because I'm usually using c++, which forces me to do a lot of writing for things, that could be automated (which by now, can only be done by the SDE). On the other hand I also use Java, which lacks the constant-iation of the this-pointer or typedefs (as known from c++). So then, the compiler would not be a blackbox anymore and everybody can create their own programming environment which suits best to the solution that's going to be created. what do you think about this idea? regards

    U L J D 4 Replies Last reply
    0
    • D D4rkTrick

      Hi, I got the feeling, that new programming languages spread out of the earth like gras... or at least did so a while ago. I want to question the need of new languages here. Why don't we have just a couple of basic rules and build the "languages" on top of it like add-ons. So if you want the have a keyword X, you can just implement it as an add-on to the compiler. Why should that be necessary? I think if you want to start a project and would have a free choice over the language you use, you might get in a situation like this: - I want to use language X, but it's library is not that big - I want to use Java, but it's too heavy - I want to use x because it hast feature y - I need lightweight stuff, so I should use X, but it lacks features, syntactic sugar, already implemented patterns. I just came to think of that, because I'm usually using c++, which forces me to do a lot of writing for things, that could be automated (which by now, can only be done by the SDE). On the other hand I also use Java, which lacks the constant-iation of the this-pointer or typedefs (as known from c++). So then, the compiler would not be a blackbox anymore and everybody can create their own programming environment which suits best to the solution that's going to be created. what do you think about this idea? regards

      U Offline
      U Offline
      User 12178240
      wrote on last edited by
      #2

      :sigh: :sigh: :sigh: :sigh: the idea is best but hard for implement but not for a programmer

      1 Reply Last reply
      0
      • D D4rkTrick

        Hi, I got the feeling, that new programming languages spread out of the earth like gras... or at least did so a while ago. I want to question the need of new languages here. Why don't we have just a couple of basic rules and build the "languages" on top of it like add-ons. So if you want the have a keyword X, you can just implement it as an add-on to the compiler. Why should that be necessary? I think if you want to start a project and would have a free choice over the language you use, you might get in a situation like this: - I want to use language X, but it's library is not that big - I want to use Java, but it's too heavy - I want to use x because it hast feature y - I need lightweight stuff, so I should use X, but it lacks features, syntactic sugar, already implemented patterns. I just came to think of that, because I'm usually using c++, which forces me to do a lot of writing for things, that could be automated (which by now, can only be done by the SDE). On the other hand I also use Java, which lacks the constant-iation of the this-pointer or typedefs (as known from c++). So then, the compiler would not be a blackbox anymore and everybody can create their own programming environment which suits best to the solution that's going to be created. what do you think about this idea? regards

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

        I think most people would download every plugin they can find. Now imagine every plugin creating separate versions that may or may not work well together. Source code isn't going to change once compiled; I do not see the advantage over loading a library and executing the containing code.

        Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

        D 1 Reply Last reply
        0
        • L Lost User

          I think most people would download every plugin they can find. Now imagine every plugin creating separate versions that may or may not work well together. Source code isn't going to change once compiled; I do not see the advantage over loading a library and executing the containing code.

          Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

          D Offline
          D Offline
          D4rkTrick
          wrote on last edited by
          #4

          You could change the syntax at places that are handy to you. I remember one article of ChristianNeumanns.He talks about functions, that should tell in their head, if they can return NULL (like Java does with exception). Because of that, he wrote a totally new language. Now, no matter how good his language is, if you can't use it, you can't have the features. But if you could load that "language feature palette" into your c++,java,smalltalk,c#,..., you can have the features in your current environment :) (?)

          L 1 Reply Last reply
          0
          • D D4rkTrick

            You could change the syntax at places that are handy to you. I remember one article of ChristianNeumanns.He talks about functions, that should tell in their head, if they can return NULL (like Java does with exception). Because of that, he wrote a totally new language. Now, no matter how good his language is, if you can't use it, you can't have the features. But if you could load that "language feature palette" into your c++,java,smalltalk,c#,..., you can have the features in your current environment :) (?)

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

            D4rkTrick wrote:

            He talks about functions, that should tell in their head, if they can return NULL (like Java does with exception). Because of that, he wrote a totally new language.

            Sounds like overkill; and when encoding too much information in a name you get more unreadable code. My user-code could adhere to the same principle, I do not see what value the change to the language has (is it the language, or rather the framework? Sounds more like the latter one where somebody thinks his naming is 'better') I also do not see how this would work in practice; it may change code unintentionally whenever someone downloads a new 'keyword'. How would that affect code that's already compiled? I think the amount of actual keywords is limited, and the bulk of extensions will be done in usercode, using plugins. As for language-extensibility, I'm happy with the current .NET runtime; new keywords are defined (!) for each version, and they are consistent - with the added option to define your own language for the runtime, and the ability to extend the syntactic sugar using either a plugin for your IDE, or adding 'aspects' :)

            Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

            D 1 Reply Last reply
            0
            • D D4rkTrick

              Hi, I got the feeling, that new programming languages spread out of the earth like gras... or at least did so a while ago. I want to question the need of new languages here. Why don't we have just a couple of basic rules and build the "languages" on top of it like add-ons. So if you want the have a keyword X, you can just implement it as an add-on to the compiler. Why should that be necessary? I think if you want to start a project and would have a free choice over the language you use, you might get in a situation like this: - I want to use language X, but it's library is not that big - I want to use Java, but it's too heavy - I want to use x because it hast feature y - I need lightweight stuff, so I should use X, but it lacks features, syntactic sugar, already implemented patterns. I just came to think of that, because I'm usually using c++, which forces me to do a lot of writing for things, that could be automated (which by now, can only be done by the SDE). On the other hand I also use Java, which lacks the constant-iation of the this-pointer or typedefs (as known from c++). So then, the compiler would not be a blackbox anymore and everybody can create their own programming environment which suits best to the solution that's going to be created. what do you think about this idea? regards

              J Offline
              J Offline
              jschell
              wrote on last edited by
              #6

              D4rkTrick wrote:

              I got the feeling, that new programming languages spread out of the earth like gras

              Rather certain that that is a fact. Use the following to watch the ones that actually make it above the noise come and then go. http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html[^] And an example of extremism https://en.wikipedia.org/wiki/Whitespace_%28programming_language%29[^]

              D4rkTrick wrote:

              So if you want the have a keyword X, you can just implement it as an add-on to the compiler.

              To a large extent there have already been languages like that. "Forth" is just that. There was some other language sponsored by the US government (i believe) years ago that did something simpler. There is however a great deal of difference between whether something is possible and whether you should do it.

              D4rkTrick wrote:

              you might get in a situation like this:

              Not me. I have learned that all of that is subjective.

              D4rkTrick wrote:

              which forces me to do a lot of writing for things, that could be automated

              Learn how to do code generation. You write a program that takes in input source and outputs code. HOWEVER, that said, do not think that even most code can be created that way. At some point the very reason programmers are needed is due to the variable nature of what is needed. And writing a code generator that can handle that is not only impossible but even attempting to do so produces code in the generator that is a mess.

              D4rkTrick wrote:

              So then, the compiler would not be a blackbox anymore

              You might enjoy taking some college level courses specifically addressing compiler design.

              1 Reply Last reply
              0
              • L Lost User

                D4rkTrick wrote:

                He talks about functions, that should tell in their head, if they can return NULL (like Java does with exception). Because of that, he wrote a totally new language.

                Sounds like overkill; and when encoding too much information in a name you get more unreadable code. My user-code could adhere to the same principle, I do not see what value the change to the language has (is it the language, or rather the framework? Sounds more like the latter one where somebody thinks his naming is 'better') I also do not see how this would work in practice; it may change code unintentionally whenever someone downloads a new 'keyword'. How would that affect code that's already compiled? I think the amount of actual keywords is limited, and the bulk of extensions will be done in usercode, using plugins. As for language-extensibility, I'm happy with the current .NET runtime; new keywords are defined (!) for each version, and they are consistent - with the added option to define your own language for the runtime, and the ability to extend the syntactic sugar using either a plugin for your IDE, or adding 'aspects' :)

                Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

                D Offline
                D Offline
                D4rkTrick
                wrote on last edited by
                #7

                Quote:

                I also do not see how this would work in practice; it may change code unintentionally whenever someone downloads a new 'keyword'. How would that affect code that's already compiled?

                oh, yeh, I actually didn't think of that! The portability would indeed suffer very much by adding such a feature. ...Also you made .NET a little bit more interesting for me :)

                L 1 Reply Last reply
                0
                • D D4rkTrick

                  Quote:

                  I also do not see how this would work in practice; it may change code unintentionally whenever someone downloads a new 'keyword'. How would that affect code that's already compiled?

                  oh, yeh, I actually didn't think of that! The portability would indeed suffer very much by adding such a feature. ...Also you made .NET a little bit more interesting for me :)

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

                  Thanks :-D

                  1 Reply Last reply
                  0
                  • D D4rkTrick

                    Hi, I got the feeling, that new programming languages spread out of the earth like gras... or at least did so a while ago. I want to question the need of new languages here. Why don't we have just a couple of basic rules and build the "languages" on top of it like add-ons. So if you want the have a keyword X, you can just implement it as an add-on to the compiler. Why should that be necessary? I think if you want to start a project and would have a free choice over the language you use, you might get in a situation like this: - I want to use language X, but it's library is not that big - I want to use Java, but it's too heavy - I want to use x because it hast feature y - I need lightweight stuff, so I should use X, but it lacks features, syntactic sugar, already implemented patterns. I just came to think of that, because I'm usually using c++, which forces me to do a lot of writing for things, that could be automated (which by now, can only be done by the SDE). On the other hand I also use Java, which lacks the constant-iation of the this-pointer or typedefs (as known from c++). So then, the compiler would not be a blackbox anymore and everybody can create their own programming environment which suits best to the solution that's going to be created. what do you think about this idea? regards

                    D Offline
                    D Offline
                    D4rkTrick
                    wrote on last edited by
                    #9

                    So funny that a couple of years later (now) people are using babel, webpack, typescript, which is essentially exactly what I was thinking at that time :)

                    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