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. Other Discussions
  3. The Weird and The Wonderful
  4. What's the Most Concise, Human-Understandable Practical Language?

What's the Most Concise, Human-Understandable Practical Language?

Scheduled Pinned Locked Moved The Weird and The Wonderful
javascriptpythoncomgame-devtools
40 Posts 24 Posters 23 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.
  • J Offline
    J Offline
    johnywhy
    wrote on last edited by
    #1

    Here's my fantasy rewrite of some Javascript. Which one do you find more understandable? Which one's function and structure is more instantly obvious? Be honest. JS

    var home = {
    cit : "Boston",
    get City () {
    return this.cit;
    },
    set City(val) {
    this.cit = val;
    }
    };

    Fantasy Rewrite

    home
    City 'Boston'

    That's sort of what i'm looking for. Notice the lack of punctuation. Notice judicious use of whitespace as syntax. Notice how the getter, setter, variable, and default value are all encapsulated into two words. What language is like that?

    What's "Human understandable"?

    I mean, easy to understand at a glance. Here's Game of Life in APL. Extremely concise! And totally NOT human-understandable.

    {≢⍸⍵}⌺3 3∊¨3+0,¨⊢

    Here's the Whitespace language. Extremely concise, and totally NOT human-understandable. Seeking characters found on a normal keyboard.

    By "human-understandable", i DON'T mean "natural language" or "sounds like spoken English". I mean, provided you have learned the special programming syntax, and that learning that syntax is no more challenging or time-consuming than learning, say, Python.

    What's "Concise"?

    Here's some COBOL. Very human understandable. But not concise:

    ADD YEARS TO AGE.
    MULTIPLY PRICE BY QUANTITY GIVING COST.
    SUBTRACT DISCOUNT FROM COST GIVING FINAL-COST.

    What's "Practical"

    By "practical" i mean, it's a wise choice for real-world programming. Ie, not just an academic experiment. It has community, tools, rich programming features.... things a language needs to be usable for real projects.

    U M F L L 17 Replies Last reply
    0
    • J johnywhy

      Here's my fantasy rewrite of some Javascript. Which one do you find more understandable? Which one's function and structure is more instantly obvious? Be honest. JS

      var home = {
      cit : "Boston",
      get City () {
      return this.cit;
      },
      set City(val) {
      this.cit = val;
      }
      };

      Fantasy Rewrite

      home
      City 'Boston'

      That's sort of what i'm looking for. Notice the lack of punctuation. Notice judicious use of whitespace as syntax. Notice how the getter, setter, variable, and default value are all encapsulated into two words. What language is like that?

      What's "Human understandable"?

      I mean, easy to understand at a glance. Here's Game of Life in APL. Extremely concise! And totally NOT human-understandable.

      {≢⍸⍵}⌺3 3∊¨3+0,¨⊢

      Here's the Whitespace language. Extremely concise, and totally NOT human-understandable. Seeking characters found on a normal keyboard.

      By "human-understandable", i DON'T mean "natural language" or "sounds like spoken English". I mean, provided you have learned the special programming syntax, and that learning that syntax is no more challenging or time-consuming than learning, say, Python.

      What's "Concise"?

      Here's some COBOL. Very human understandable. But not concise:

      ADD YEARS TO AGE.
      MULTIPLY PRICE BY QUANTITY GIVING COST.
      SUBTRACT DISCOUNT FROM COST GIVING FINAL-COST.

      What's "Practical"

      By "practical" i mean, it's a wise choice for real-world programming. Ie, not just an academic experiment. It has community, tools, rich programming features.... things a language needs to be usable for real projects.

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

      I wold go with some Lisp dialect. It looks weird until you get used to it, then all other languages look hard to understand. The reason I found it easy is because the grammer is so simple there's really not much to learn.

      R 1 Reply Last reply
      0
      • J johnywhy

        Here's my fantasy rewrite of some Javascript. Which one do you find more understandable? Which one's function and structure is more instantly obvious? Be honest. JS

        var home = {
        cit : "Boston",
        get City () {
        return this.cit;
        },
        set City(val) {
        this.cit = val;
        }
        };

        Fantasy Rewrite

        home
        City 'Boston'

        That's sort of what i'm looking for. Notice the lack of punctuation. Notice judicious use of whitespace as syntax. Notice how the getter, setter, variable, and default value are all encapsulated into two words. What language is like that?

        What's "Human understandable"?

        I mean, easy to understand at a glance. Here's Game of Life in APL. Extremely concise! And totally NOT human-understandable.

        {≢⍸⍵}⌺3 3∊¨3+0,¨⊢

        Here's the Whitespace language. Extremely concise, and totally NOT human-understandable. Seeking characters found on a normal keyboard.

        By "human-understandable", i DON'T mean "natural language" or "sounds like spoken English". I mean, provided you have learned the special programming syntax, and that learning that syntax is no more challenging or time-consuming than learning, say, Python.

        What's "Concise"?

        Here's some COBOL. Very human understandable. But not concise:

        ADD YEARS TO AGE.
        MULTIPLY PRICE BY QUANTITY GIVING COST.
        SUBTRACT DISCOUNT FROM COST GIVING FINAL-COST.

        What's "Practical"

        By "practical" i mean, it's a wise choice for real-world programming. Ie, not just an academic experiment. It has community, tools, rich programming features.... things a language needs to be usable for real projects.

        M Offline
        M Offline
        Member_14564709
        wrote on last edited by
        #3

        BASIC. The only problem with any of the modern BASIC variants is the the name. It should have been changed years ago to something that sounds better. BASIC is the direction that programming languages should have been taking for decades. A programming language is a tool. A tool is something that makes work easier. C, Java and the like make simple jobs complicated, and complicated jobs - well, we won't go there. Unfortunately BASIC has been all but killed off because it scared the crap out of the C guys. VB was arguably one of Microsoft's biggest successes - suddenly anyone smarter than a manager or an accountant could write useful programs. They weren't always fast, or efficient, but they solved real world problems, then and there. And here lies one of the less understood issues with software - many, many programs are written as quick one offs to answer a question, or extract some data. They do not need the .NET framework or the latest C++ or Java support libs, or some horrendously expensive and complicated Studio Suite to create them BASIC was able to do this AND produce high quality complicated full fledged applications. And it still can. My favourite is PowerBasic - PowerBASIC[^] There are a few others. It seems to me that all the 'new' languages we see are based on C syntax. A whole bunch of cryptic punctuation marks interspersed with some unreadable, unintuitive bits of code. It's time to move on. C was never meant to last this long. It was an interim replacement to FORTRAN, until the 'new' languages came along. Sadly they never did.

        L S J J 4 Replies Last reply
        0
        • J johnywhy

          Here's my fantasy rewrite of some Javascript. Which one do you find more understandable? Which one's function and structure is more instantly obvious? Be honest. JS

          var home = {
          cit : "Boston",
          get City () {
          return this.cit;
          },
          set City(val) {
          this.cit = val;
          }
          };

          Fantasy Rewrite

          home
          City 'Boston'

          That's sort of what i'm looking for. Notice the lack of punctuation. Notice judicious use of whitespace as syntax. Notice how the getter, setter, variable, and default value are all encapsulated into two words. What language is like that?

          What's "Human understandable"?

          I mean, easy to understand at a glance. Here's Game of Life in APL. Extremely concise! And totally NOT human-understandable.

          {≢⍸⍵}⌺3 3∊¨3+0,¨⊢

          Here's the Whitespace language. Extremely concise, and totally NOT human-understandable. Seeking characters found on a normal keyboard.

          By "human-understandable", i DON'T mean "natural language" or "sounds like spoken English". I mean, provided you have learned the special programming syntax, and that learning that syntax is no more challenging or time-consuming than learning, say, Python.

          What's "Concise"?

          Here's some COBOL. Very human understandable. But not concise:

          ADD YEARS TO AGE.
          MULTIPLY PRICE BY QUANTITY GIVING COST.
          SUBTRACT DISCOUNT FROM COST GIVING FINAL-COST.

          What's "Practical"

          By "practical" i mean, it's a wise choice for real-world programming. Ie, not just an academic experiment. It has community, tools, rich programming features.... things a language needs to be usable for real projects.

          F Offline
          F Offline
          Fred2834
          wrote on last edited by
          #4

          Hello, The question must be looked at from several perspectives. I would start by saying that if you give me 3 sliders to grade "practical", "concise" and "human readable", there is no way you will reach 100% on each, I would argue that not even an 80-80-80 is possible. Everything is a trade-off, and you will sacrifice in one area because there are things you definitely want to keep in another, and those things have a cost. It is up to you to decide which area you want to favor. Or rather, which language you want to support based on your style as a programmer. Then comes the question of the language's purpose. One should not compare a system language vs a scripting language for example. By nature, they have different purposes, have been build to solve different issues. One is compiled, the other is interpreted, and like it or not this has an impact on its design. Each area you suggest deserve its own debate, almost. "Human readable" for example. In your example, I would not want a very long hash table to be described without any special character. In the real world, large XML or JSON files are a reality. Imagine those without anything to identify what goes where. Tab separated ? or indentation dependent ? I personally think Python is an abomination for that reason alone, but there I am going against the majority, so let's avoid waking up the beast :) But you see, right here, by giving more focus to "human readable", you have already lost in practicality. Trade-off as I said. "Practical" : you mentioned "it has community, tools, …" => well those things are not the language itself, and they do not make it practical. The language itself should be self sufficient, you want to compare apples with apples. The fact that a language has a huge community is just showing its popularity, not its intrinsic worth. If I look at my own experience in scripting languages, I have done many, and I firmly believe that the best of them is Lua, but the world favors Python. So which is more practical ? Probably Python if you look at the community and tools, but I think it is Lua for the human-readable part. As for conciseness, I think it is not really the biggest problem. At some point, you have to tell the computer what to do. The real question is how much you want to work to get there. The real question is : "how much work should be accomplished by the programmer and by the compiler ?" If it is hard to write, it is probably easy to parse (think C++). If it is easy to write, it is probably hard to parse (

          J 1 Reply Last reply
          0
          • J johnywhy

            Here's my fantasy rewrite of some Javascript. Which one do you find more understandable? Which one's function and structure is more instantly obvious? Be honest. JS

            var home = {
            cit : "Boston",
            get City () {
            return this.cit;
            },
            set City(val) {
            this.cit = val;
            }
            };

            Fantasy Rewrite

            home
            City 'Boston'

            That's sort of what i'm looking for. Notice the lack of punctuation. Notice judicious use of whitespace as syntax. Notice how the getter, setter, variable, and default value are all encapsulated into two words. What language is like that?

            What's "Human understandable"?

            I mean, easy to understand at a glance. Here's Game of Life in APL. Extremely concise! And totally NOT human-understandable.

            {≢⍸⍵}⌺3 3∊¨3+0,¨⊢

            Here's the Whitespace language. Extremely concise, and totally NOT human-understandable. Seeking characters found on a normal keyboard.

            By "human-understandable", i DON'T mean "natural language" or "sounds like spoken English". I mean, provided you have learned the special programming syntax, and that learning that syntax is no more challenging or time-consuming than learning, say, Python.

            What's "Concise"?

            Here's some COBOL. Very human understandable. But not concise:

            ADD YEARS TO AGE.
            MULTIPLY PRICE BY QUANTITY GIVING COST.
            SUBTRACT DISCOUNT FROM COST GIVING FINAL-COST.

            What's "Practical"

            By "practical" i mean, it's a wise choice for real-world programming. Ie, not just an academic experiment. It has community, tools, rich programming features.... things a language needs to be usable for real projects.

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

            The major problem with your idea is "Human understandable" you didn't define the audience, and saying "everybody" is not the answer. my old mother trying to use a DVD player - one with not that many buttons:

            "how do I make it go"
            "press the 'Play' button."
            "you mean this one '|> Play', with a triangle on it."
            "yes."
            "what does the triangle mean?"

            and that's not even adding in complications of her first language being English. Let's look at your concise [anti] example

            ADD YEARS TO AGE.
            MULTIPLY PRICE BY QUANTITY GIVING COST.
            SUBTRACT DISCOUNT FROM COST GIVING FINAL-COST.

            ahh the layman says, I see. but then the accountant

            it's all wrong, you've mixed up terms, "'cost' is purchasing, 'price' is selling." "price times quantity is selling price, not even 'nett cost' let alone 'cost'"

            understandable to some, an abject failure to others, even the programmer and his audience spoke a different language - probably should fire the project manager for that stuffup. Consider the image they placed on the Voyager space probe: the guy/gal in a circle with arms and legs stretched out in a circle - supposedly according to experts 'understandable' by anything that finds it. There's people on Earth, the very concept it's meant to represent that look at that and scratch their heads. Early explorers would encounter 'natives [perhaps chanting] and shaking their spears' - in some cases it meant 'go away, this is our [special] place, any closer we will attack' - in others 'welcome strangers [yes we have weapons but we are choosing not to use them so be nice]' Sorry, but "Human Understandable" is not possible, not without defining/limiting the audience and even the language.' Does say a Lithuanian farm hand that's never gone outside know what 'city' means? Even pictures don't help, how long were Egyptian hieroglyphs - pretty plain to the people of the time of writing - undecipherable before the Rosetta stone was found? short answer is: it's impossible

            pestilence [ pes-tl-uh ns ] noun 1. a deadly or virulent epidemic disease. especially bubonic plague. 2. something that is considered harmful, destructive, or evil. Synonyms: pest, plague, CCP

            J 1 Reply Last reply
            0
            • J johnywhy

              Here's my fantasy rewrite of some Javascript. Which one do you find more understandable? Which one's function and structure is more instantly obvious? Be honest. JS

              var home = {
              cit : "Boston",
              get City () {
              return this.cit;
              },
              set City(val) {
              this.cit = val;
              }
              };

              Fantasy Rewrite

              home
              City 'Boston'

              That's sort of what i'm looking for. Notice the lack of punctuation. Notice judicious use of whitespace as syntax. Notice how the getter, setter, variable, and default value are all encapsulated into two words. What language is like that?

              What's "Human understandable"?

              I mean, easy to understand at a glance. Here's Game of Life in APL. Extremely concise! And totally NOT human-understandable.

              {≢⍸⍵}⌺3 3∊¨3+0,¨⊢

              Here's the Whitespace language. Extremely concise, and totally NOT human-understandable. Seeking characters found on a normal keyboard.

              By "human-understandable", i DON'T mean "natural language" or "sounds like spoken English". I mean, provided you have learned the special programming syntax, and that learning that syntax is no more challenging or time-consuming than learning, say, Python.

              What's "Concise"?

              Here's some COBOL. Very human understandable. But not concise:

              ADD YEARS TO AGE.
              MULTIPLY PRICE BY QUANTITY GIVING COST.
              SUBTRACT DISCOUNT FROM COST GIVING FINAL-COST.

              What's "Practical"

              By "practical" i mean, it's a wise choice for real-world programming. Ie, not just an academic experiment. It has community, tools, rich programming features.... things a language needs to be usable for real projects.

              L Offline
              L Offline
              Lorenzo Bertolino
              wrote on last edited by
              #6

              It won't be the most concise, human-understandable and practical language but Dart sure is very concise, for a statically typed language, dropping a lot of the oop cruft that languages such as c# or java have

              abstract class Item {
              use();
              }

              class Chest implements Item {
              List contents;

              Chest(this.contents);

              use() => print("$this has ${contents.length} items.");
              }

              class Sword implements Item {
              int damage = 5;

              use() => print("$this dealt $damage damage.");
              }

              main(){
              var chest = Chest([Sword()]);

              chest.use();

              for (var item in chest.contents) {
              item.use();
              }
              }

              It drops public and private in favor of using "_" before private instance variables, doesn't require the new keyword, has a very concise (and imo clear) function definition style and a constructor definition that can't be made slimmer without impacting heavily on understandability. Regarding | Notice the lack of punctuation. Notice judicious use of whitespace as syntax. (how do you quote text? :) ) Yeah, no, as you can see there is a lot of punctuation and whitespace is basically meaningless For the practicality of this language... outside of Flutter, not much, honestly. I find it to be very neat but it isn't going to replace js any time soon Edit: the code is taken more or less literally from the examples on dart.dev

              Richard DeemingR 1 Reply Last reply
              0
              • M Member_14564709

                BASIC. The only problem with any of the modern BASIC variants is the the name. It should have been changed years ago to something that sounds better. BASIC is the direction that programming languages should have been taking for decades. A programming language is a tool. A tool is something that makes work easier. C, Java and the like make simple jobs complicated, and complicated jobs - well, we won't go there. Unfortunately BASIC has been all but killed off because it scared the crap out of the C guys. VB was arguably one of Microsoft's biggest successes - suddenly anyone smarter than a manager or an accountant could write useful programs. They weren't always fast, or efficient, but they solved real world problems, then and there. And here lies one of the less understood issues with software - many, many programs are written as quick one offs to answer a question, or extract some data. They do not need the .NET framework or the latest C++ or Java support libs, or some horrendously expensive and complicated Studio Suite to create them BASIC was able to do this AND produce high quality complicated full fledged applications. And it still can. My favourite is PowerBasic - PowerBASIC[^] There are a few others. It seems to me that all the 'new' languages we see are based on C syntax. A whole bunch of cryptic punctuation marks interspersed with some unreadable, unintuitive bits of code. It's time to move on. C was never meant to last this long. It was an interim replacement to FORTRAN, until the 'new' languages came along. Sadly they never did.

                L Offline
                L Offline
                Leo56
                wrote on last edited by
                #7

                Up-vote for the comment on 'C'-style syntax (looking at you C#), but disagree about BASIC - way too wordy for it's own good. It's all down to horses-for-courses really, isn't it? But a programming language for (semi) non-programmers to do actual work (you know, get stuff done, at work) needs to have reasonably transparent syntax and not be cluttered with the kind of stuff systems programmers and computer science professors deem 'essential' for 'clarity' and nerd-'beauty'. OK, apologies to systems programmers :-D - their criteria are very different from the request in the original question... I think the reason Python has become so popular (apart from fashion?) is that it does allow non-programmers to quickly grasp the essentials and actually do stuff - and if they need to then do more complicated stuff, it allows them to do that as well in a natural progression? And because it's (slightly) less verbose that BASIC it makes it more human-readable(?) It's a toughy... :laugh:

                1 Reply Last reply
                0
                • J johnywhy

                  Here's my fantasy rewrite of some Javascript. Which one do you find more understandable? Which one's function and structure is more instantly obvious? Be honest. JS

                  var home = {
                  cit : "Boston",
                  get City () {
                  return this.cit;
                  },
                  set City(val) {
                  this.cit = val;
                  }
                  };

                  Fantasy Rewrite

                  home
                  City 'Boston'

                  That's sort of what i'm looking for. Notice the lack of punctuation. Notice judicious use of whitespace as syntax. Notice how the getter, setter, variable, and default value are all encapsulated into two words. What language is like that?

                  What's "Human understandable"?

                  I mean, easy to understand at a glance. Here's Game of Life in APL. Extremely concise! And totally NOT human-understandable.

                  {≢⍸⍵}⌺3 3∊¨3+0,¨⊢

                  Here's the Whitespace language. Extremely concise, and totally NOT human-understandable. Seeking characters found on a normal keyboard.

                  By "human-understandable", i DON'T mean "natural language" or "sounds like spoken English". I mean, provided you have learned the special programming syntax, and that learning that syntax is no more challenging or time-consuming than learning, say, Python.

                  What's "Concise"?

                  Here's some COBOL. Very human understandable. But not concise:

                  ADD YEARS TO AGE.
                  MULTIPLY PRICE BY QUANTITY GIVING COST.
                  SUBTRACT DISCOUNT FROM COST GIVING FINAL-COST.

                  What's "Practical"

                  By "practical" i mean, it's a wise choice for real-world programming. Ie, not just an academic experiment. It has community, tools, rich programming features.... things a language needs to be usable for real projects.

                  K Offline
                  K Offline
                  KateAshman
                  wrote on last edited by
                  #8

                  Just pick C#, whatever your intentions. 5 years of working with high school graduates, and that's the one with the lowest learning curve on average. At a glance, here are definitely more concise and human readable languages out there (lolcode is a nice example) but they all come at the cost of a much higher learning curve and very limited functionality. Notice the lack of "or" in the previous sentence. 🙂

                  K 1 Reply Last reply
                  0
                  • K KateAshman

                    Just pick C#, whatever your intentions. 5 years of working with high school graduates, and that's the one with the lowest learning curve on average. At a glance, here are definitely more concise and human readable languages out there (lolcode is a nice example) but they all come at the cost of a much higher learning curve and very limited functionality. Notice the lack of "or" in the previous sentence. 🙂

                    K Offline
                    K Offline
                    kalberts
                    wrote on last edited by
                    #9

                    I was doing Windows programming in C++ for several years before switching to C#, learning many of its small advantages over C++ as I went along. After a number of years with C#, I was going to pick up an old private hobby project in C++, and learned one huge advantage of C# over C++ that I had never realized before: The amount of red tape in C++! You spend an unbelievable amount of code lines on setting up and and initializing things, header files, declarations of all sorts. Module interfaces are handled by VS in a "database" (I grew up with ACID, so I put the term in quotes :-)) rather than header files. Sure, if you go behind the curtain, you will see that VS and WPF do very similar things, but they do it for you! A number of small things are done for you as well, such as heap management. I started using VS when switching to C#; my old C++ project was sprinkled with lint directives (i.e. lint comments) all over, cluttering up the source files. With VS and C# I never missed Lint, there was no need for it. So I could drop lint from my C++ code as well, couldn't I? But VS Intellisense doesn't work half as well with C++ as with C#, much due to the far less controlled use of pointers in C++. So rather than fixing up and completing my old C++ code, I deleted several hundreds of lines, a good bunch of header files, brushed out the heap management code and adapted the remaining code to C# standards. I never looked back. With C++, so much of my attention, and so many source lines, are wasted on things that are not solving the real problem; it is just red tape to facilitate the problem solution part. For C#, this is far less prominent. Certainly, C# has inherited from C/C++ a number of elements I wish it had not. (An example: Why do we have to announce in advance with a "try" that the block has an exception handler? The handler is there, that should be enough!) Some of it may be ascribed to the old single-pass parsing ideals, but today there is no reason to accept such limitation. I can live with it, but it is ugly. But if I have the choice, I will not live with all that other required C++ blurb that really does nothing towards solving the problem at hand.

                    Richard DeemingR 1 Reply Last reply
                    0
                    • J johnywhy

                      Here's my fantasy rewrite of some Javascript. Which one do you find more understandable? Which one's function and structure is more instantly obvious? Be honest. JS

                      var home = {
                      cit : "Boston",
                      get City () {
                      return this.cit;
                      },
                      set City(val) {
                      this.cit = val;
                      }
                      };

                      Fantasy Rewrite

                      home
                      City 'Boston'

                      That's sort of what i'm looking for. Notice the lack of punctuation. Notice judicious use of whitespace as syntax. Notice how the getter, setter, variable, and default value are all encapsulated into two words. What language is like that?

                      What's "Human understandable"?

                      I mean, easy to understand at a glance. Here's Game of Life in APL. Extremely concise! And totally NOT human-understandable.

                      {≢⍸⍵}⌺3 3∊¨3+0,¨⊢

                      Here's the Whitespace language. Extremely concise, and totally NOT human-understandable. Seeking characters found on a normal keyboard.

                      By "human-understandable", i DON'T mean "natural language" or "sounds like spoken English". I mean, provided you have learned the special programming syntax, and that learning that syntax is no more challenging or time-consuming than learning, say, Python.

                      What's "Concise"?

                      Here's some COBOL. Very human understandable. But not concise:

                      ADD YEARS TO AGE.
                      MULTIPLY PRICE BY QUANTITY GIVING COST.
                      SUBTRACT DISCOUNT FROM COST GIVING FINAL-COST.

                      What's "Practical"

                      By "practical" i mean, it's a wise choice for real-world programming. Ie, not just an academic experiment. It has community, tools, rich programming features.... things a language needs to be usable for real projects.

                      S Offline
                      S Offline
                      Stuart Dootson
                      wrote on last edited by
                      #10

                      Javascript is obviously dynamically typed - but as I gravitate towards statically typed languages, I'll go for a language like Ocaml, Haskell or F#. They all define record types similarly, but with slightly different keywords and syntax. I'll give an example in Haskell: ```haskell data Location = Location { city :: String } let home = Location { city = "Boston" } ``` and F# ```f# type Location = { City : string } let home = Location { City = "Boston" } // Or we can use anonymous records.... let other_home = {| City = "Boston" |} ```

                      johnywhy wrote:

                      I mean, easy to understand at a glance.

                      I find Haskell's syntax pretty clear for pure functions. Having pattern matching brought out to the top level of function definitions makes it similar to have you might write a piece-wise definition of said function. Having function signatures be optional (the compiler will work out what the signature should be if you leave it out) leaves code less cluttered ```Haskell factorial 1 = 1 factorial n = n * factorial (n-1) list_length [] = 0 list_length (first_element:rest) = 1 + list_length rest ``` and F# again: ```f# let rec fac n = match n with | 1 -> 1 | n -> n * fac (n-1) let rec length list = match list with | [] -> 0 | first :: rest -> 1 + length rest ```

                      johnywhy wrote:

                      What's "Concise"?

                      johnywhy wrote:

                      What's "Practical"

                      I'll probably select F#. It's a .NET language, so can use .NET libraries. I like how the various features work together to provide powerful facilities with little code. An example - some code taken from the Microsoft website to download a bunch of URLs in parallel, with async/await ```f# open System.Net open Microsoft.FSharp.Control.WebExtensions // Defines a list of pairs of strings let urlList = [ "Microsoft.com", "http://www.microsoft.com/" "MSDN", "http://msdn.microsoft.com/" "Bing", "http://www.bing.com" ] let fetchAsync(name, url:string) = // The async block means this fucntion defines a task to be run asynchronously async { try let uri = new System.Uri(url) let webClient = new WebClient() // In async {}, let! operates a bit like Javascript's 'async' keyword let! html = webClient.AsyncDownloadStrin

                      1 Reply Last reply
                      0
                      • L Lorenzo Bertolino

                        It won't be the most concise, human-understandable and practical language but Dart sure is very concise, for a statically typed language, dropping a lot of the oop cruft that languages such as c# or java have

                        abstract class Item {
                        use();
                        }

                        class Chest implements Item {
                        List contents;

                        Chest(this.contents);

                        use() => print("$this has ${contents.length} items.");
                        }

                        class Sword implements Item {
                        int damage = 5;

                        use() => print("$this dealt $damage damage.");
                        }

                        main(){
                        var chest = Chest([Sword()]);

                        chest.use();

                        for (var item in chest.contents) {
                        item.use();
                        }
                        }

                        It drops public and private in favor of using "_" before private instance variables, doesn't require the new keyword, has a very concise (and imo clear) function definition style and a constructor definition that can't be made slimmer without impacting heavily on understandability. Regarding | Notice the lack of punctuation. Notice judicious use of whitespace as syntax. (how do you quote text? :) ) Yeah, no, as you can see there is a lot of punctuation and whitespace is basically meaningless For the practicality of this language... outside of Flutter, not much, honestly. I find it to be very neat but it isn't going to replace js any time soon Edit: the code is taken more or less literally from the examples on dart.dev

                        Richard DeemingR Offline
                        Richard DeemingR Offline
                        Richard Deeming
                        wrote on last edited by
                        #11

                        Lorenzo Bertolino wrote:

                        (how do you quote text? :) )

                        Select the text in the original message and click the "Quote Selected Text" button. :) Or paste the text into the "message" box and select "Quoted Text" in the pop-up. Or, if you want to do it the hard way, type the blockquote markup around the quoted text:

                        <blockquote class="quote"><div class="op">Quote:</div> Quoted text goes here...</blockquote>

                        Quote:

                        Quoted text goes here...


                        "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

                        "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

                        1 Reply Last reply
                        0
                        • K kalberts

                          I was doing Windows programming in C++ for several years before switching to C#, learning many of its small advantages over C++ as I went along. After a number of years with C#, I was going to pick up an old private hobby project in C++, and learned one huge advantage of C# over C++ that I had never realized before: The amount of red tape in C++! You spend an unbelievable amount of code lines on setting up and and initializing things, header files, declarations of all sorts. Module interfaces are handled by VS in a "database" (I grew up with ACID, so I put the term in quotes :-)) rather than header files. Sure, if you go behind the curtain, you will see that VS and WPF do very similar things, but they do it for you! A number of small things are done for you as well, such as heap management. I started using VS when switching to C#; my old C++ project was sprinkled with lint directives (i.e. lint comments) all over, cluttering up the source files. With VS and C# I never missed Lint, there was no need for it. So I could drop lint from my C++ code as well, couldn't I? But VS Intellisense doesn't work half as well with C++ as with C#, much due to the far less controlled use of pointers in C++. So rather than fixing up and completing my old C++ code, I deleted several hundreds of lines, a good bunch of header files, brushed out the heap management code and adapted the remaining code to C# standards. I never looked back. With C++, so much of my attention, and so many source lines, are wasted on things that are not solving the real problem; it is just red tape to facilitate the problem solution part. For C#, this is far less prominent. Certainly, C# has inherited from C/C++ a number of elements I wish it had not. (An example: Why do we have to announce in advance with a "try" that the block has an exception handler? The handler is there, that should be enough!) Some of it may be ascribed to the old single-pass parsing ideals, but today there is no reason to accept such limitation. I can live with it, but it is ugly. But if I have the choice, I will not live with all that other required C++ blurb that really does nothing towards solving the problem at hand.

                          Richard DeemingR Offline
                          Richard DeemingR Offline
                          Richard Deeming
                          wrote on last edited by
                          #12

                          Member 7989122 wrote:

                          Why do we have to announce in advance with a "try" that the block has an exception handler? The handler is there, that should be enough!

                          CallSomeMethod();

                          try
                          {
                          CallSomeOtherMethod();
                          }
                          catch (SomeFunkyException)
                          {
                          }

                          Without the explicit try, how would you indicate that the first method call wasn't covered by the catch block?


                          "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

                          "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

                          K 1 Reply Last reply
                          0
                          • J johnywhy

                            Here's my fantasy rewrite of some Javascript. Which one do you find more understandable? Which one's function and structure is more instantly obvious? Be honest. JS

                            var home = {
                            cit : "Boston",
                            get City () {
                            return this.cit;
                            },
                            set City(val) {
                            this.cit = val;
                            }
                            };

                            Fantasy Rewrite

                            home
                            City 'Boston'

                            That's sort of what i'm looking for. Notice the lack of punctuation. Notice judicious use of whitespace as syntax. Notice how the getter, setter, variable, and default value are all encapsulated into two words. What language is like that?

                            What's "Human understandable"?

                            I mean, easy to understand at a glance. Here's Game of Life in APL. Extremely concise! And totally NOT human-understandable.

                            {≢⍸⍵}⌺3 3∊¨3+0,¨⊢

                            Here's the Whitespace language. Extremely concise, and totally NOT human-understandable. Seeking characters found on a normal keyboard.

                            By "human-understandable", i DON'T mean "natural language" or "sounds like spoken English". I mean, provided you have learned the special programming syntax, and that learning that syntax is no more challenging or time-consuming than learning, say, Python.

                            What's "Concise"?

                            Here's some COBOL. Very human understandable. But not concise:

                            ADD YEARS TO AGE.
                            MULTIPLY PRICE BY QUANTITY GIVING COST.
                            SUBTRACT DISCOUNT FROM COST GIVING FINAL-COST.

                            What's "Practical"

                            By "practical" i mean, it's a wise choice for real-world programming. Ie, not just an academic experiment. It has community, tools, rich programming features.... things a language needs to be usable for real projects.

                            B Offline
                            B Offline
                            BryanFazekas
                            wrote on last edited by
                            #13

                            Every professional program has 3 audiences: 1. the programmer 2. other programmers 3. the compiler The "fantasy language" fails in all 3 areas: 1. Sure, right now the syntax makes perfect sense. But come back to the same code after a 6 month or even 2 year lapse? Every programmer (including me) I know looks at their own, older code with a "WTF was I doing?" expression on their face. Remove the keywords and punctuation and the problem gets a lot harder. Everyone thinks they'll remember exactly what they were doing at the time; 99%+ of us don't. 2. A professional program is highly likely to be supported (eventually) by at least one other programmer. The problems of point #1 are multiplied by 10 or even 100 because the second programmer has to figure things out. I've supported enough code to have a deep appreciation for well organized code that includes comments which explain "why" something is being done. My effort is reduced tremendously by those 2 things. 3. Use of "judicious" whitespace as syntax is a poor idea. Sure, the compiler can figure it out, but when the whitespace is wrong, the programmer cannot see the mistake. The real problem here is not compiler errors (which should point out the offending line so the programmer can [hopefully] figure it out), but when the program DOES compile and run, but produces wrong results. The constant move towards conciseness is being taken to an extreme, and it's causing more problems than it is solving. The more concise the language, the steeper the learning curve, and the more prone to programmer errors, and those problems are harder to solve. Programming languages are created for people, not computers. The computer runs machine code -- regardless of how the program starts, it ends up in machine code. Write your code so the someone else can figure things out in the least amount of time.

                            1 Reply Last reply
                            0
                            • J johnywhy

                              Here's my fantasy rewrite of some Javascript. Which one do you find more understandable? Which one's function and structure is more instantly obvious? Be honest. JS

                              var home = {
                              cit : "Boston",
                              get City () {
                              return this.cit;
                              },
                              set City(val) {
                              this.cit = val;
                              }
                              };

                              Fantasy Rewrite

                              home
                              City 'Boston'

                              That's sort of what i'm looking for. Notice the lack of punctuation. Notice judicious use of whitespace as syntax. Notice how the getter, setter, variable, and default value are all encapsulated into two words. What language is like that?

                              What's "Human understandable"?

                              I mean, easy to understand at a glance. Here's Game of Life in APL. Extremely concise! And totally NOT human-understandable.

                              {≢⍸⍵}⌺3 3∊¨3+0,¨⊢

                              Here's the Whitespace language. Extremely concise, and totally NOT human-understandable. Seeking characters found on a normal keyboard.

                              By "human-understandable", i DON'T mean "natural language" or "sounds like spoken English". I mean, provided you have learned the special programming syntax, and that learning that syntax is no more challenging or time-consuming than learning, say, Python.

                              What's "Concise"?

                              Here's some COBOL. Very human understandable. But not concise:

                              ADD YEARS TO AGE.
                              MULTIPLY PRICE BY QUANTITY GIVING COST.
                              SUBTRACT DISCOUNT FROM COST GIVING FINAL-COST.

                              What's "Practical"

                              By "practical" i mean, it's a wise choice for real-world programming. Ie, not just an academic experiment. It has community, tools, rich programming features.... things a language needs to be usable for real projects.

                              W Offline
                              W Offline
                              W Balboos GHB
                              wrote on last edited by
                              #14

                              Let me explain to you the undesirability of you desire: All that punctuation is to remove ambiguity. You can play games and replace semicolons with new-lines, specific indent counts, whatever, and it's still the same. Is "Start->End" really better than "{->}". Neither logically nor visually. If you have a block of code in a conditional you need some method to mark statements off as part of the block and not just the next statements to be executed after the conditional. As for why things keep copying the 'C-like' structure? Not saying it's the end-all of design but it eliminates a lot of the absurd arbitrary. Like my first language, FORTRAN, having all statements start in column seven. I find your javascript example ludicrous. You make the javaScript unnecessarily complex for the simple act of assigning a value to a symbol - but not in your dream version. Just to start. Coming right down to it - human readable is a nebulous concept as you intend it. Mandarin is human readable - unless you don't know it. So is Hindi, Hebrew, and Arabic. Unless you are not accustomed to it. Those who speak these languages natively would differ with you strongly as to what is readable. Thus it is for a coding language. You learn to look at it and your eyes and brain will translate it. Meanwhile, the efficient interpretation of the syntax is guaranteed by the punctuation.

                              Ravings en masse^

                              "The difference between genius and stupidity is that genius has its limits." - Albert Einstein

                              "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010

                              1 Reply Last reply
                              0
                              • M Member_14564709

                                BASIC. The only problem with any of the modern BASIC variants is the the name. It should have been changed years ago to something that sounds better. BASIC is the direction that programming languages should have been taking for decades. A programming language is a tool. A tool is something that makes work easier. C, Java and the like make simple jobs complicated, and complicated jobs - well, we won't go there. Unfortunately BASIC has been all but killed off because it scared the crap out of the C guys. VB was arguably one of Microsoft's biggest successes - suddenly anyone smarter than a manager or an accountant could write useful programs. They weren't always fast, or efficient, but they solved real world problems, then and there. And here lies one of the less understood issues with software - many, many programs are written as quick one offs to answer a question, or extract some data. They do not need the .NET framework or the latest C++ or Java support libs, or some horrendously expensive and complicated Studio Suite to create them BASIC was able to do this AND produce high quality complicated full fledged applications. And it still can. My favourite is PowerBasic - PowerBASIC[^] There are a few others. It seems to me that all the 'new' languages we see are based on C syntax. A whole bunch of cryptic punctuation marks interspersed with some unreadable, unintuitive bits of code. It's time to move on. C was never meant to last this long. It was an interim replacement to FORTRAN, until the 'new' languages came along. Sadly they never did.

                                S Offline
                                S Offline
                                Steve Naidamast
                                wrote on last edited by
                                #15

                                Bravo!!! :)

                                Steve Naidamast Sr. Software Engineer Black Falcon Software, Inc. blackfalconsoftware@outlook.com

                                1 Reply Last reply
                                0
                                • J johnywhy

                                  Here's my fantasy rewrite of some Javascript. Which one do you find more understandable? Which one's function and structure is more instantly obvious? Be honest. JS

                                  var home = {
                                  cit : "Boston",
                                  get City () {
                                  return this.cit;
                                  },
                                  set City(val) {
                                  this.cit = val;
                                  }
                                  };

                                  Fantasy Rewrite

                                  home
                                  City 'Boston'

                                  That's sort of what i'm looking for. Notice the lack of punctuation. Notice judicious use of whitespace as syntax. Notice how the getter, setter, variable, and default value are all encapsulated into two words. What language is like that?

                                  What's "Human understandable"?

                                  I mean, easy to understand at a glance. Here's Game of Life in APL. Extremely concise! And totally NOT human-understandable.

                                  {≢⍸⍵}⌺3 3∊¨3+0,¨⊢

                                  Here's the Whitespace language. Extremely concise, and totally NOT human-understandable. Seeking characters found on a normal keyboard.

                                  By "human-understandable", i DON'T mean "natural language" or "sounds like spoken English". I mean, provided you have learned the special programming syntax, and that learning that syntax is no more challenging or time-consuming than learning, say, Python.

                                  What's "Concise"?

                                  Here's some COBOL. Very human understandable. But not concise:

                                  ADD YEARS TO AGE.
                                  MULTIPLY PRICE BY QUANTITY GIVING COST.
                                  SUBTRACT DISCOUNT FROM COST GIVING FINAL-COST.

                                  What's "Practical"

                                  By "practical" i mean, it's a wise choice for real-world programming. Ie, not just an academic experiment. It has community, tools, rich programming features.... things a language needs to be usable for real projects.

                                  U Offline
                                  U Offline
                                  User 11783308
                                  wrote on last edited by
                                  #16

                                  Well, just in terms of the JavaScript, here is how I would write it.

                                  var home =
                                  {
                                  cit : "Boston"
                                  };

                                  home.city = function(aCity)
                                  {
                                  if (arguments.length)
                                  this.cit = aCity;
                                  else
                                  return this.cit;
                                  };

                                  Yes, the function is a bit longer but there is only one function instead of two and writing pointless "get" and "set" is no longer necessary. That is a holdover from languages which do not have true getter / setter type attributes. I would note that the function would normally be part of a class (or prototype) and not the object itself. In C++, it takes more work, but you can write code so that you can literally write

                                  aCity = home.city;
                                  home.city = aCity;

                                  I usually don't do that, but I do do the same thing in C++ as in JavaScript. Note that brace placement may make it look longer, but that is matter of style. Braces are part of a statement block, so I indent the same as the statement block. And don't use unnecessary braces. The make code less readable. I agree with you about APL not being readable. Perl has a lot of the same characteristics. I disagree about COBOL, it is both far less concise and far less readable. If something is too concise, it becomes unreadable. But, conversely, when it is too expansive (non-concise?) then it is also less readable. A straight mathematical expression whether in a conditional or an assignment is generally maximally readable. Assuming that the length and complexity of the expression is not too large. And that weird and strange operators (APL) are not in use. So languages whose basic structure is similar to C tend to be most readable without becoming too concise.

                                  1 Reply Last reply
                                  0
                                  • Richard DeemingR Richard Deeming

                                    Member 7989122 wrote:

                                    Why do we have to announce in advance with a "try" that the block has an exception handler? The handler is there, that should be enough!

                                    CallSomeMethod();

                                    try
                                    {
                                    CallSomeOtherMethod();
                                    }
                                    catch (SomeFunkyException)
                                    {
                                    }

                                    Without the explicit try, how would you indicate that the first method call wasn't covered by the catch block?


                                    "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

                                    K Offline
                                    K Offline
                                    kalberts
                                    wrote on last edited by
                                    #17

                                    You could e.g. look at CHILL, aka Z.200: Any block may have a handler attached: If there is an ON-clause between the body of the block and the terminating semicolon, the block has a hanlder. If there is no ON-clause, it does not have a handler. THere is no need to pre-announce it. Note that in CHILL, as well as in most other sensible languages of the Algol class, a statement is a block; you don't need to enclose a single statement to make it one. So it would be like

                                    CallSomeMethod();

                                    CallSomeOtherMethod() -- note: no semicolon - block not yet complete
                                    ON (SomeFunkyException):
                                    LogThisException();
                                    END; -- here is the semicolon terminating the block

                                    Usually when you want to attch a handler to a group of statements, that group is e.g. a function body, a loop, an if/then/else etc. defining a block. If these two calls are looped, and you want to attach the handler to the loop - i.e. the it is invoked when the exception breaks out of this loop, you would write it as

                                    DO
                                    CallSomeMethod();
                                    CallSomeOtherMethod();
                                    OD -- note: no semicolon; loop still incomplete
                                    ON (SomeFunkyException): -- handler for exception in the loop statement
                                    LogThisException();
                                    END;

                                    The DO-OD bracing of the loop body makes it a block, to which a handler may be attached without any further blocking. If you want to attach a handler to the two calls, not to the loop as such, you have to make them into block by bracing them:

                                    DO WHILE ExceptionCount < 10;
                                    SomeCallNotHanldedByTheOnClause();
                                    BEGIN
                                    CallSomeMethod();
                                    CallSomeOtherMethod();
                                    END -- no semicolon - handler follows
                                    ON (SomeFunkyException): -- handler for exception in the loop statement
                                    LogThisException();
                                    Exceptioncount +:= 1;
                                    END;
                                    AnotherCallWithNoHandler();
                                    OD;

                                    Now the handler for the two statements is processed within the loop, and unless another exception is caused, control stays within the loop. CHILL uses keywords rather than braces; that is not the point here. Braces might have saved a few keystrokes, but since keywords often come in pairs, they do their own bracketing, like DO-OD, ON-END, ... You need to indicate which kind of block (like DO), and adding a brace to indicate "I am serious - a block!" is redundant. You could of course save a keystroke by replacing the OD with a closing brace, but I'd find it strange for braces not to come in pairs. I rather have an OD terminating a loop body, a FI term

                                    Richard DeemingR 1 Reply Last reply
                                    0
                                    • K kalberts

                                      You could e.g. look at CHILL, aka Z.200: Any block may have a handler attached: If there is an ON-clause between the body of the block and the terminating semicolon, the block has a hanlder. If there is no ON-clause, it does not have a handler. THere is no need to pre-announce it. Note that in CHILL, as well as in most other sensible languages of the Algol class, a statement is a block; you don't need to enclose a single statement to make it one. So it would be like

                                      CallSomeMethod();

                                      CallSomeOtherMethod() -- note: no semicolon - block not yet complete
                                      ON (SomeFunkyException):
                                      LogThisException();
                                      END; -- here is the semicolon terminating the block

                                      Usually when you want to attch a handler to a group of statements, that group is e.g. a function body, a loop, an if/then/else etc. defining a block. If these two calls are looped, and you want to attach the handler to the loop - i.e. the it is invoked when the exception breaks out of this loop, you would write it as

                                      DO
                                      CallSomeMethod();
                                      CallSomeOtherMethod();
                                      OD -- note: no semicolon; loop still incomplete
                                      ON (SomeFunkyException): -- handler for exception in the loop statement
                                      LogThisException();
                                      END;

                                      The DO-OD bracing of the loop body makes it a block, to which a handler may be attached without any further blocking. If you want to attach a handler to the two calls, not to the loop as such, you have to make them into block by bracing them:

                                      DO WHILE ExceptionCount < 10;
                                      SomeCallNotHanldedByTheOnClause();
                                      BEGIN
                                      CallSomeMethod();
                                      CallSomeOtherMethod();
                                      END -- no semicolon - handler follows
                                      ON (SomeFunkyException): -- handler for exception in the loop statement
                                      LogThisException();
                                      Exceptioncount +:= 1;
                                      END;
                                      AnotherCallWithNoHandler();
                                      OD;

                                      Now the handler for the two statements is processed within the loop, and unless another exception is caused, control stays within the loop. CHILL uses keywords rather than braces; that is not the point here. Braces might have saved a few keystrokes, but since keywords often come in pairs, they do their own bracketing, like DO-OD, ON-END, ... You need to indicate which kind of block (like DO), and adding a brace to indicate "I am serious - a block!" is redundant. You could of course save a keystroke by replacing the OD with a closing brace, but I'd find it strange for braces not to come in pairs. I rather have an OD terminating a loop body, a FI term

                                      Richard DeemingR Offline
                                      Richard DeemingR Offline
                                      Richard Deeming
                                      wrote on last edited by
                                      #18

                                      I must be missing something - with the exception (no pun intended!) of the single-statement / single-block case, why is:

                                      BEGIN
                                      ...
                                      END
                                      ON (SomeFunkyException): ...
                                      END;

                                      any better than:

                                      try
                                      {
                                      ...
                                      }
                                      catch (SomeFunkyException)
                                      {
                                      ...
                                      }

                                      Is it just the curly-braces you don't like? :confused:


                                      "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

                                      "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

                                      K 1 Reply Last reply
                                      0
                                      • J johnywhy

                                        Here's my fantasy rewrite of some Javascript. Which one do you find more understandable? Which one's function and structure is more instantly obvious? Be honest. JS

                                        var home = {
                                        cit : "Boston",
                                        get City () {
                                        return this.cit;
                                        },
                                        set City(val) {
                                        this.cit = val;
                                        }
                                        };

                                        Fantasy Rewrite

                                        home
                                        City 'Boston'

                                        That's sort of what i'm looking for. Notice the lack of punctuation. Notice judicious use of whitespace as syntax. Notice how the getter, setter, variable, and default value are all encapsulated into two words. What language is like that?

                                        What's "Human understandable"?

                                        I mean, easy to understand at a glance. Here's Game of Life in APL. Extremely concise! And totally NOT human-understandable.

                                        {≢⍸⍵}⌺3 3∊¨3+0,¨⊢

                                        Here's the Whitespace language. Extremely concise, and totally NOT human-understandable. Seeking characters found on a normal keyboard.

                                        By "human-understandable", i DON'T mean "natural language" or "sounds like spoken English". I mean, provided you have learned the special programming syntax, and that learning that syntax is no more challenging or time-consuming than learning, say, Python.

                                        What's "Concise"?

                                        Here's some COBOL. Very human understandable. But not concise:

                                        ADD YEARS TO AGE.
                                        MULTIPLY PRICE BY QUANTITY GIVING COST.
                                        SUBTRACT DISCOUNT FROM COST GIVING FINAL-COST.

                                        What's "Practical"

                                        By "practical" i mean, it's a wise choice for real-world programming. Ie, not just an academic experiment. It has community, tools, rich programming features.... things a language needs to be usable for real projects.

                                        S Offline
                                        S Offline
                                        sasadler
                                        wrote on last edited by
                                        #19

                                        A couple questions: What is your audience? Non-technical average Joe? Technical (domain expert) but non-programmer? Software engineer? Firmware Engineer?, etc, etc, etc. What is the target program type? Web? Windows/Linux application? Embedded realtime?, etc, etc, etc I believe you're not going to find (or create) the 'perfect' language that's practical and concise that will handle all these user types and targets.

                                        1 Reply Last reply
                                        0
                                        • J johnywhy

                                          Here's my fantasy rewrite of some Javascript. Which one do you find more understandable? Which one's function and structure is more instantly obvious? Be honest. JS

                                          var home = {
                                          cit : "Boston",
                                          get City () {
                                          return this.cit;
                                          },
                                          set City(val) {
                                          this.cit = val;
                                          }
                                          };

                                          Fantasy Rewrite

                                          home
                                          City 'Boston'

                                          That's sort of what i'm looking for. Notice the lack of punctuation. Notice judicious use of whitespace as syntax. Notice how the getter, setter, variable, and default value are all encapsulated into two words. What language is like that?

                                          What's "Human understandable"?

                                          I mean, easy to understand at a glance. Here's Game of Life in APL. Extremely concise! And totally NOT human-understandable.

                                          {≢⍸⍵}⌺3 3∊¨3+0,¨⊢

                                          Here's the Whitespace language. Extremely concise, and totally NOT human-understandable. Seeking characters found on a normal keyboard.

                                          By "human-understandable", i DON'T mean "natural language" or "sounds like spoken English". I mean, provided you have learned the special programming syntax, and that learning that syntax is no more challenging or time-consuming than learning, say, Python.

                                          What's "Concise"?

                                          Here's some COBOL. Very human understandable. But not concise:

                                          ADD YEARS TO AGE.
                                          MULTIPLY PRICE BY QUANTITY GIVING COST.
                                          SUBTRACT DISCOUNT FROM COST GIVING FINAL-COST.

                                          What's "Practical"

                                          By "practical" i mean, it's a wise choice for real-world programming. Ie, not just an academic experiment. It has community, tools, rich programming features.... things a language needs to be usable for real projects.

                                          N Offline
                                          N Offline
                                          nedzadarek
                                          wrote on last edited by
                                          #20

                                          Kotlin: maybe not best "human-understandable" but it takes Java and make it more concise. You don't have to write many things the Kotlin that you write in the Java. Red: it's still in the alpha version but you should keep an eye on it. You can write in different styles but you can write small & concise code. It has some "weird features". Ruby: It might be not fastest language but it's very readable. No "parenthesis hell" (same as in the Red) as in other languages.

                                          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