Slashdot Mirror


Power of Modern Programming Languages is That They Are Expressive, Readable, Concise, Precise, and Executable (scientificamerican.com)

An anonymous reader shares a Scientific American article: Programming has changed. In first generation languages like FORTRAN and C, the burden was on programmers to translate high-level concepts into code. With modern programming languages -- I'll use Python as an example -- we use functions, objects, modules, and libraries to extend the language, and that doesn't just make programs better, it changes what programming is. Programming used to be about translation: expressing ideas in natural language, working with them in math notation, then writing flowcharts and pseudocode, and finally writing a program. Translation was necessary because each language offers different capabilities. Natural language is expressive and readable, pseudocode is more precise, math notation is concise, and code is executable. But the price of translation is that we are limited to the subset of ideas we can express effectively in each language. Some ideas that are easy to express computationally are awkward to write in math notation, and the symbolic manipulations we do in math are impossible in most programming languages. The power of modern programming languages is that they are expressive, readable, concise, precise, and executable. That means we can eliminate middleman languages and use one language to explore, learn, teach, and think.

9 of 268 comments (clear)

  1. What? by Anonymous Coward · · Score: 5, Insightful

    With modern programming languages -- I'll use Python as an example -- we use functions, objects, modules, and libraries

    Who writes this shit? Confirming that C uses neither functions nor objects nor modules nor libraries

    1. Re:What? by AchilleTalon · · Score: 4, Insightful

      My first, second and third reaction too. And what you say for C is also true for Fortran. That guy doesn't know what he is talking about. Neither Fortran, nor C are first generation languages as he states it anyway. This article is total crap. Shame on you Scientific American for publishing that shit.

      --
      Achille Talon
      Hop!
  2. Hey, hey, hey, don't recycle the charter of COBOL by 140Mandak262Jamuna · · Score: 5, Insightful

    I remember reading about why COBOL so much superior to FORTRAN. And sounds exactly like the summary!

    --
    sed -e 's/Chuck Norris/Rajnikant/g' joke > fact
  3. The subborn human race. by geekmux · · Score: 4, Insightful

    "...That means we can eliminate middleman languages and use one language to explore, learn, teach, and think."

    One solution for all? Never gonna happen.

    Some prime examples:

    "That means we can eliminate the standard system and use one metric system to measure everything."

    "That means we can eliminate the right-side driving wheel and everyone will drive on the same side of the road."

    "That means we can eliminate all of the world's individual spoken languages and use only one language to communicate."

    Humans are stubborn. Like really fucking stubborn.

  4. Re:Rust is a counter example to these claims. by MightyMartian · · Score: 1, Insightful

    The article is rubbish. OOP programming, informally at least, has been around since the 1960s. Procedural programming has been around as long. Yes, the very first generation of languages were pretty bereft of "modern" features, but by the 1970s we had most of the paradigms of modern programming in place.

    --
    The world's burning. Moped Jesus spotted on I50. Details at 11.
  5. concise? readable? by petes_PoV · · Score: 5, Insightful

    I don't buy this. A simple hello world in Java is much more complex and wordy than the same functionality in 50 year-old BASIC. And any language that relies on whitespace to modify the program flow cannot be described as readable.

    And many object-oriented programs have so much of their basic functions hidden away in inheritance and class definitions that a printed form of a program is impractical. I would not call that "progress".

    As for natural language, it tends to be incredibly imprecise: the meaning is only apparent when the context of its use is taken into account. I would love to see a translator that tried to convert "natural language" sarcasm into executable code. But I wouldn't want it running in my driverless vehicle or airplane.

    --
    politicians are like babies' nappies: they should both be changed regularly and for the same reasons
  6. I call BS. Modern programming languages = bloat by passionplay · · Score: 4, Insightful

    Unless you're talking about C, or D, the fact of the matter is that you've hidden all the computational overhead in multiple layers of automated translation behind your syntactical sugar.

    Case in point: non-memory managed languages don't need to manage memory - memory requirements for these programs are huge due to inadequate planning. How many programmers take into account object pooling?

    Case in point: The Motorola Startac was a very limited device but had its programming in hardware - you could not type faster than the device. New smartphones have 2-3Gb in memory and yet are less responsive.

    Case in point: a field programmable gate array was never intended for production use - yet every computer today uses these

    Case in point: how many Java programmers think about += string concatenation versus =+ string concatenation?

    While the K&R manual is correct that every complex problem can be further simplified by one more level of indirection, it is not true that there is no cost.

    Our computers today are 1000 times more powerful and solve the same problems as before. So what has changed? Our efficiency in coding as dropped and we are not using the resources at hand to make better solutions but sloppier ones that require less effort on our part but more computational overhead.

    We have become lazy and complacent and we call it progress. Until our programs can optimize to the level that we can generate by hand, I would not deem to consider our current state of programming languages an improvement in anything other than readability.

  7. What a piece of crap by frovingslosh · · Score: 3, Insightful

    By executable the author actually means interpreted ..Any decent programmer knows this means the language is slower than need be. Translation is not a bad thing, it is another word for compiling and/or assembling, the process that converts human readable code into actual machine instructions. Any language could be compiled, but in practice some languages (for example C) are compiled (and assembled) while others (for example Basic) are typically interpreted. Interpreting makes the language slower, as a step that occurs one time in the creation of a compiled program before the program is ever run must now happen each time the program is run (and in many cases it happens each time a line of code is rerun, although there are "just-in-time" tricks that can avoid the repeated interpreting.). Interpreted languages are an unfortunate side effect of faster computers, people get lazy, want to not have to go through a separate compilation stem when making a simple change, and figure the interpreted language is "good enough" for the user, even though it means the program will run slower than need be each time every single user runs it.

    Interpreted languages have their place. Basic was a good introductory teaching language in its day, as it was intended to quickly let beginners write and test their code. But only the feeble minded would have tried to use it for production coding. There are great special purpose interpreted languages like AWK that are quite good for quick and dirty one time tasks. And I'm even saying all of this as being a Forth programmer who even was on a team that implemented a Forth on the C64. (Forth actually does a lot of the "compilation" when each line or word is written, but it is still inefficient as it spends most of its time in subroutine calls and returns). But interpreted languages will always sacrifice speed, and you can write a compiler to translate any interpreted language into true machine code (although in many cases it isn't worth doing).

    --
    I'm an American. I love this country and the freedoms that we used to have.
  8. Re:The Desk by Anonymous Coward · · Score: 2, Insightful

    Scientific American isn't what it once was. This as been going on for years. I speak as a long time (30+ years) subscriber. for at least the last eight years, through all the tenure of the current Editor and most if not all of the previous one, the magazine has been watering down it's presentation considerably.
    I suspect it all started when the Nature group bought it. They don't want a magazine that competes with Smithonian or Nature, they want it to compete more with Discover. So, few of the articles are now written by scientists, and more and more are written by journalists. The magazine is also no longer written for a community college audience, and more and more for a junior high school audience.
    You are treating this article as if written for a real programmer audience. It wasn't. It was written for teens who might be thinking about maybe someday perhaps trying to program a computer or something.