Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×
Programming Hardware

Ask Slashdot: What Should Be the Attributes of an Ideal Programming Language If Computers Were Infinitely Fast? 326

An anonymous reader writes: Earlier today, Tim Sweeney, the founder of Epic Games, asked his Twitter followers an interesting question: "What are the attributes of an ideal programming language if computers were infinitely fast, and we designed for coding productivity only?" I could think of several things, the chief of which would be getting rid of the garbage collection. I was wondering what other things you folks would suggest?
This discussion has been archived. No new comments can be posted.

Ask Slashdot: What Should Be the Attributes of an Ideal Programming Language If Computers Were Infinitely Fast?

Comments Filter:
  • by SuperKendall ( 25149 ) on Monday May 08, 2017 @04:15PM (#54379537)

    This is stupid. Computer will never be "infinitely fast" or even close to it. There is always the possibility of ding computation in such a way as to drag down any system.

    There is always a compromise between programmer productivity, code maintainability, and system performance. It's not like you can realistically escape this triad so why pretend one leg does not exist? The computer programming industry has enough problems with magical thinking as it is.

    • by Topwiz ( 1470979 ) on Monday May 08, 2017 @04:18PM (#54379579)
      Also stupid is getting rid of garbage collection. If it happens automatically at infinite speed, removing it would have no effect on your coding productivity.
      • by soft_guy ( 534437 ) * on Monday May 08, 2017 @05:02PM (#54379959)
        If the computer is infinitely fast, maybe it also has infinite memory so instead of garbage collection you could just leak everything.
        • The point is, that wasn't specified, but infinite speed was. So sacrificing memory to gain speed makes no sense.

      • by ShanghaiBill ( 739463 ) on Monday May 08, 2017 @05:28PM (#54380179)

        Also stupid is getting rid of garbage collection.

        Even having a "programming language" would be stupid. An infinitely fast computer could just run a NN that was infinitely wide and infinitely deep and it would already know exactly what you want before you even ask for it.

      • > If [GC] happens automatically at infinite speed, removing it would have no effect on your coding productivity.

        Having GC improves productivity. You no longer need to free anything you allocate. It does not mean you have infinite memory. Just that the system will deallocate things for you.

        Improving productivity was one of the requirements of the problem statement.
    • I really don't understand at all what programming languages have to do with computer speed. Anything that makes databases queries faster works for me.....
      • Here's an example then. If speed wasn't an issue, every data structure could be a database.

      • If speed wasn't an issue, how would you design your query language to make YOU more productive?
      • by mikael ( 484 )

        As programming languages become increasingly high level (assembler -> C -> C++ -> Java -> Python), the amount of generic boilerplate to handle module linking, object-orientated constructs also increases. At the far end, you have your SQL database and client which wrap an entire 4GL around a network protocol to implement and optimize complex search requests. Some programming languages can abstract away the need to understand advanced parallel processing techniques in order to take advantage of mo

    • by drew_kime ( 303965 ) on Monday May 08, 2017 @04:42PM (#54379817) Journal

      There is always a compromise between programmer productivity, code maintainability, and system performance.

      But if you didn't have to worry about the performance, what would boost the other two?

      This is how great advances are made. Design for the world you wish you had, then figure out how to make it real.

      • But if you didn't have to worry about the performance, what would boost the other two?

        From experience, things that would badly impact actual performance on a computer that is not infinitely fast...

        Which is why the question is stupid. This is not how advancements are made, this is how people are lead down false paths with a dead end. Advancements are made by considering the impact of all important factors...

        • Re:Bad idea (Score:4, Informative)

          by ranton ( 36917 ) on Monday May 08, 2017 @05:19PM (#54380107)

          Which is why the question is stupid. This is not how advancements are made, this is how people are lead down false paths with a dead end. Advancements are made by considering the impact of all important factors...

          This line of thinking is foolish. Advancements are made from all kids of approaches. If you want to think innovatively, you should probably be following paths you assume will lead to a dead end. If are aren't failing most of the time, you aren't thinking very innovatively.

      • by Kjella ( 173770 )

        But if you didn't have to worry about the performance, what would boost the other two? This is how great advances are made. Design for the world you wish you had, then figure out how to make it real.

        Actually it's more like create a magic fantasy land and create solutions that don't work anywhere else. Or how space ships would look like if we had warp cores, if you prefer the sci-fi version. The first thing I'd get rid of is threads, who needs it if you have infinite single thread performance? Shaders? Dedicated hardware? You'd make games without all the tricks just ray trace everything. Databases with zero indexing and roll-ups, because you can do an infinite number of table scans and aggregations inst

    • The question is not stupid. It is to get one to think about what makes a human programmer more productive and not to focus on the computer execution speed. The way I read it is that even if a language was interpreted on a mechanical system powered by rodents running on spinning wheels; what attributes of a great programming language would make humans more productive at programming if execution speed were not a factor for consideration? If somehow your programming language would be fast and you didn't car
    • If the computer was infinitely fast, there would be two programming languages.

      1. Nonlinear optimization.
      2. Teach-by-example, e.g. a neural net of maximum size for the RAM constraints, where all the weights are found by brute force.

      The former is for when you know exactly what you want, the latter is for when you don't and use supervised learning instead.
      For that matter, an infinitely fast computer is a hypercomputer [wikipedia.org], so 2. could easily be "the smallest Turing machine that produces the desired outputs
  • by sycodon ( 149926 ) on Monday May 08, 2017 @04:16PM (#54379549)

    ...and infinitely fast computer would be self aware and wouldn't need instructions.

    • by OzPeter ( 195038 )

      ...and infinitely fast computer would be self aware and wouldn't need instructions.

      Yeah but you have to watch out for the pain in all the diodes down its left side

  • by aicrules ( 819392 ) on Monday May 08, 2017 @04:17PM (#54379559)
    And GOTO, no GOSUB though, that's dumb
  • by American AC in Paris ( 230456 ) on Monday May 08, 2017 @04:17PM (#54379567) Homepage

    The language for an infinitely fast computer is called DUH.

    There are no keywords, operators, or logic structures; the entirety of the language is you typing "DUH" into the command line, then hitting ENTER.

    Upon pressing ENTER, you are presented with every possible program that could ever exist. All you need to do is select the one you want.

  • by famebait ( 450028 ) on Monday May 08, 2017 @04:18PM (#54379581)

    Getting rid of garbage collection? The feature whose whole point is boosting productivity at the cost of performance? In a setting where performance is explicitly not and productivity explicitly is? Can you spell "hangup"?

     

    • by beelsebob ( 529313 ) on Monday May 08, 2017 @04:31PM (#54379723)

      Yeh, I was thinking exactly this. The valid reasons for getting rid of garbage collection are along the lines of "it causes the application to end up using a shit ton of memory if you want it to be any way performant", and "you can't get sensible real time guarantees when your whole program might pause to execute GC".

      GC is exactly what you would want if you can guarantee that it executes in 0ms.

  • getting rid of the garbage collection

    Why would that be the chief thing to drop if you had infinite performance? The only big problem with garbage collection IS performance.

    • One of the goals of the problem statement was to improve human productivity. Therefore GC would be a requirement. Not having to manually manage memory removes a large burden from programmers.

      GC has an often overlooked, but fairly silent other advantage. It greases the compatibility of libraries written by many different authors. All of the libraries are guaranteed to have the same memory management discipline. Just to pick on C / C++ for example, multiple libraries might have different memory manage
    • > The only big problem with garbage collection IS performance.

      Actually if you can have several times the memory than your program actually needs, then performance is no longer an issue with any modern concurrent GC.

      I'm serious.

      Programmer time is expensive. Hardware is cheap. Memory is cheap. Would you rather get your code to market sooner because you can use a higher level language without memory management in exchange for adding an extra 32 or 64 GB of memory? Getting to market sooner may
  • by sourcerror ( 1718066 ) on Monday May 08, 2017 @04:19PM (#54379597)

    It should be a highly parallel language, where you can program with constraints.

    • What? Fuck no!

      Look, parallelization solves a lot of problems on current, non-infinite programs. However, it also introduces complexity. If speed were not an issue, and you just wanted to optimize in terms of programmer time, you would not allow multiple threads. It would be literally: LoadResource(); SolveTravelingSalesmanProblem(); Something(); in order instead of setting up callbacks so that the person could keep using the computer and queueing other things up while that was happening. Far easier to

    • by _merlin ( 160982 )

      If the computer is infinitely fast, you can avoid the complication that parallelism brings with it. No need to spread out over multiple execution units if one is infinitely fast anyway.

  • by Frederic54 ( 3788 ) on Monday May 08, 2017 @04:21PM (#54379611) Journal

    There is no garbage collector in C, so it must be the ideal programming language ;-)

    Special mention for assembly too.

  • by thedarb ( 181754 ) on Monday May 08, 2017 @04:21PM (#54379615)

    It should be capable of understanding normal language, any known language, and execute the idea of what you asked for... But do so with disastrous unconsidered consequences. Man should not toy with technology!

  • I'd like to be able to type "i didn't explain that well but you know what i mean" and have that compile to the correct logic.
  • An ideal programming language would support powerful features like the following statement:

    print("Does P == NP?", P == NP ? "Yes." : "No.")

  • by netsavior ( 627338 ) on Monday May 08, 2017 @04:23PM (#54379637)
    I just imagine a world of cross-joins, extremely complicated in-string, lazy iteration and the like.

    If there were no penalty for pivoting data or iterating though sets, we would all gravitate toward the shittiest constructs imaginable...

    I mean hell, browsers are basically expected to be limitless now... HTML hello world used to look like "Hello World" Now it looks like
    "Hey javascript framework, load 500 modules, then ask the server what "Hello" is, then ask the server what "world" is, then style it all in whatever your 13 generated CSS files say it should be styled as, and tell google analytics that someone looked at my hello world page."
    • by sinij ( 911942 )
      I propose netsavior lema: Infinitely fast computers would result in infinitely shitty code run on it all the time.
  • Wouldn't an infinitely fast computer be completely useless in that doing anything with it would result in a race condition?
  • They don't have to be infinitely fast. They need to be infinitely deterministic. Ie. a measurement or an interrupt must arrive in time, with in-time defined by the maximum timing boundaries of the experiment being executed.

    If that happens with a garbage-collector (which is now infinitely fast), then we could perhaps use higher languages for real time.

    Obviously if performance no longer matters at all, all function parameters, both in and out, could be checked. Sure why not, then.

    And how about having infinite

    • > then we could perhaps use higher languages for real time.

      You can already use GC languages for soft real time. Like a game. Or signal processing. Simply DO NOT allocate any data structures during the soft real time loop. Set up everything. Allocate all data structures in advance. Then enter your soft real time loop, do your signal processing, high frequency trading, game loop, etc.

      I would point out that big banks and enterprise applications use Java. Java is used in high frequency trading.
      • by freax ( 80371 )

        Hey! It's not our fault that your employer makes shitty technology decisions. No need to make us worry about it.

        Silly money people.

  • An infinitely fast computer should be able to interpret my programming abstractions based off of zero lines of code.
  • ... "register" and "inline" - to make it even faster than infinitely.
  • Need to be built as carefully as real experiments. This isn't one. If the computer is infinitely fast then the computer language can be structured to process non ambiguous natural language, we don't need computer languages, just people trained to be unambiguous.

    That is totally ignoring the fact that our society runs on the premise that computation is expensive, and an infinitely fast computer would destroy all concepts of security based on expensive computation, and society would collapse and there would

  • It should be able to understand and do whatever comes after "I want you to..." both as a vocal or written statement.

  • I would create a counter to count from 0 to infinity, and point the CPU IP do the address of that big integer. The program I want will be generated somewhere along the way. The trick is to filter out the ones you don't want.

    • by freax ( 80371 )

      You just created the first need for symmetric multiprocessing right there: as your first computer's results must be filtered by a second infinitely fast computer.

  • Your program would therefore be done before you'd written it. You can then say, "what a dumb-ass I will have had been." I'll just rewrite it. Oh, I will have did? That's looking pretty good. Let's just...

  • I guess he never heard of Wirth's Law [wikipedia.org]. Compared to 20 years ago, our computers are operating at and infinite speed with ridiculous amounts of RAM. Yet the desktop, IDEs, and applications seem slower than they were 20 years ago, require Gigabytes(!!!) of RAM, and do not seem to do anything more than they did before. Go figure.

  • by yodleboy ( 982200 ) on Monday May 08, 2017 @04:53PM (#54379887)
    What a pedantic bunch. Mental race conditions because of the word 'infinitely'. Anyway, let's ask this question a different way. "If modern hardware had been available at the time, how would you have designed languages like C, C++ and JAVA? What compromises were made that continue to impact those languages?"
  • If it's infinitely fast, and I don't have to maintain the code, why not?

  • Never upgrade the hardware to run Windows ever again — I'll probably be out of the job as an IT tech.
  • by pellik ( 193063 ) on Monday May 08, 2017 @05:03PM (#54379975)
    So if I screw up and create an infinite loop this computer would complete the loop anyway in only one unit of time?
  • Not sure how though.
  • All relationships (e.g. inheritance, type) would automatically be dynamic. A framework for doing static typing and inheritance would be provided as part of the runtime.

    Similarly, all components could be naturally and transparently distributed with little or no additional code complexity. That infinite speed could be kept busy making sure there are no race conditions.

    Finally, no control structures in the language itself -- all control structures would be part of the runtime and it should be straightforward

  • if computers were literally infinitely fast, you could pretty easily replace most of "coding" with brute-force graph search of the program space. the profession of programming as we know it would be obsolete within a few years; it would remain as a quaint curiosity practiced by philosophical lisp-weenies and hardcore enthusiasts. maybe there would be a niche market for "artisanal programs" or something.

  • 10 Program killer app
    20 Make lots of money for me with minimal effort.
    30 goto 10

    Because math is hard.... and paying for education and experience is not good for corporate bottom lines.

    Write a programming language that Middle Managers can use to design our products.

  • If computers would be infinitely fast and thus also have nigh infinite memory and storage (because fractal compression at zero cost - duh) we'd all inmediately be using what is called a Direct Manipulation Interface (DMI) or Direct Manipulation Environment. Squeak [squeak.org] comes close to that, but a good DMI would be something like Flash combined with RunRev using Python or something as a PL, including a touchscreen object modeller for contemporary tablets and some other niceties. The difference between programming

  • Take Python and Javascript. Make it completely unlike them.

  • I figure the ideal programming language to tell an infinitely fast computer what to do is your natural language. Just have the computer sit in on the meetings between the client and the developer. You'll still need a developer to tell the client that no, they don't want blinking fonts, and help clarify vague and contradictory statements, but then just have the computer build what it heard. With infinite processing power, I am of course assuming that very very good natural language processing is possible.
  • I'd like a language that is almost purely functional. Think about how much of programming is spent designing data structures for efficient lookup of intermediate results. If computers were infinitely fast, you would just compute everything from scratch based on the original input.

    For a graphics engine, this would mean taking the art as the artists originally created it and doing all the processing needed to display it, every frame.

    For a web browser, you would re-render starting with the HTML every frame

  • If you had an infinitely fast computer you'd want to be outside it's lightcone so it doesn't vaporize you and everything around you.

  • The person that wrote this either never had a course in computability or failed it. The bottom line is that "infinite speed" does not matter in reality, because it turns out to be not the same as "infinite computing power". "Infinite computing power" is provable impossible, it leads directly to a contradiction.

    Basically, you would not get much more than what current compilers are already doing, you would just not have to wait for it.

  • by Beeftopia ( 1846720 ) on Monday May 08, 2017 @08:04PM (#54381297)

    The real question being asked here is, "How do you make a programming language easier and more idiot-proof?" Right off the bat, there is just no substitute for ability + experience. You need both (or if not experience, a whole lot of ability).

    Remember, the thing a programming language does is translate human-readable text into processor instructions - one's and zeros.

    How to do that more easily and have the program robustly do exactly what you want? Object oriented is brilliant IMO, for example. Forcing you to make classes (a way to group code), and create complex methods (functions), and just instantiate the object (the mere act of doing so running multiple functions, and being able to call with one line a function that does a whole bunch of stuff.

    First there was assembly, line by line interaction with the processor. Then Basic, then function-oriented programs which groups functionality into functions, then object-oriented programming (grouping functionality into classes and their methods), and object-based programming (e.g. JavaScript - everything is an object, except primitives).

    What is all this leading to? Trying to take the average human's mental concepts and turn them into machine code in an easier and more error-proof fashion.

    Deep stuff for a Slashdot thread. We'd need the likes of Claude Shannon and Bjarne Stroustrup to really bite into this.

    People are still going to need to learn the language of the computer, even if/when it could understand natural language ("I wanna add this list of numbers together, divide it by the number of numbers" versus "I want the average of this list of numbers". "And then I want to display it in a flashing red box.").

    Christ, what a maintenance nightmare. Ease of generation of machine code versus maintainability? "Why was this asshole doing all this bit shifting in this function?"

    Well, hopefully I framed the real question a bit better, got no idea of what the next evolutionary step would be.

  • If such existed. (Score:4, Interesting)

    by jcochran ( 309950 ) on Monday May 08, 2017 @08:47PM (#54381507)

    I'd replace a programming language with more of an interview system.

    Basically, you'd tell the computer what problem or task you wish it to do. If it knew how to perform the task, then your job is complete. If it doesn't know, it would ask you to break the problem down into smaller sub tasks. You do so and for each sub task that the computer knows how to solve, it would do so. And for each sub task that it didn't know, it would recursively ask how to solve those sub tasks. As for a library, the computer would remember every task that it had been taught previously.

    There would still be programmers, but their job wouldn't be using any specific language, but instead describing how to solve problems or perform tasks.

Love may laugh at locksmiths, but he has a profound respect for money bags. -- Sidney Paternoster, "The Folly of the Wise"

Working...