Jump to content

Programming language to use with an infinitely fast CPU

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
21 replies to this topic

#1
twinbee

twinbee

    Newbie

  • Members
  • Pip
  • 4 posts
Hi all, I'm new to this forum.

Assuming CPU/memory/bandwidth/latency speed were no barrier, which programming language would be best to use?

Would it something like OO styled BASIC, or something declarative perhaps?

Perhaps logic programming would be the best way to go, so that the solution is defined, rather than the steps needed to reach the solution. Would imperative programming still be useful at this point? (I'm guessing yes).

Could one go to an even higher level of programming? Is Logic programming (aka Prolog) in a sense, the highest level language there is?

#2
Guest_Jordan_*

Guest_Jordan_*
  • Guests
If you had no limit on resources, any language would be great. What makes a language slower or faster is the amount of resources it consumes. If you remove that, there is nothing to hinder any language.

#3
twinbee

twinbee

    Newbie

  • Members
  • Pip
  • 4 posts
Well, Ruby for example has much terser, more elegant code than something like C, but the cost is CPU speed of course. I was wondering what the highest level multi-purpose language might look like, since speed and efficiency would be no barrier with an infinitely fast CPU. Perhaps a mix of Ruby and Prolog?

#4
TcM

TcM

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 11,147 posts
So basically you are asking for the most advanced programming language? No matter how much resources it takes?

#5
twinbee

twinbee

    Newbie

  • Members
  • Pip
  • 4 posts
Pretty much yes, and what characteristics it may take (such as looking Prolog or BASIC like), and what kind of programming style (imperative or declarative). Problems can be defined in ways previously unthinkable, no matter how inefficient they would be. Bogosort/Bozosort for sorting would be a good example, and maybe certain languages would implement that more tersely than others etc. Love to hear of other possibilities.

#6
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
Your question makes the choice irrelevant. The winning language would probably be whatever allows the programmer to most directly express the ideas.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#7
PythonPower

PythonPower

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 230 posts
Something like Python or Mathematica would get my vote.

In that situation languages wouldn't be very important since it is easy to create an inefficient solution to almost all problems in any language. The difficult thing is reducing computational complexity and that no-long matters.

#8
Mathematix

Mathematix

    Programmer

  • Members
  • PipPipPipPip
  • 112 posts
When we analyse algorithms was tend to compare differing solutions to what is ultimately the same problem, so no matter how unlimited our resources in terms of speed and storage capacities the same arguments will still hold.

#9
dirkfirst

dirkfirst

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 354 posts

twinbee said:

Pretty much yes, and what characteristics it may take (such as looking Prolog or BASIC like), and what kind of programming style (imperative or declarative). Problems can be defined in ways previously unthinkable, no matter how inefficient they would be. Bogosort/Bozosort for sorting would be a good example, and maybe certain languages would implement that more tersely than others etc. Love to hear of other possibilities.

Visual Basic would be an example of an easily expressed language that is a resource hog. Removing the resource limit would eliminate the problem.

#10
twinbee

twinbee

    Newbie

  • Members
  • Pip
  • 4 posts
Okay, I know it's going to be much easier either way, but do you guys think we can simple use an imperative language from then on, or would the addition of a declarative language style allow certain ideas to be expressed more clearly/flexibly/easily/tersely.

I haven't had much experience with functional or logic-based languages, so it's not easy for me to envisage.

#11
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
I think the real issue would come down to:
1) how easy is it to write correct code?
2) how easy is it to write stable code?
3) how easy is it to write maintainable code?
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#12
dargueta

dargueta

    Writes binary right handed and hex left handed

  • Moderators
  • 4,722 posts
Different languages are suited for different purposes. For text parsing, I'd prefer Perl to C/C++, for example. If there's no restriction on resources then really it's just a question of making the programmer's life easier.
sudo rm -rf /