Ask Slashdot: What Should Be the Attributes of an Ideal Programming Language If Computers Were Infinitely Fast?
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 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.
"There is more worth loving than we have strength to love." - Brian Jay Stanley
If computers were infinitely fast, there wouldn't be any reason to change any programming languages since infinitely fast means you can do whatever you want and not have to worry about it.
...and infinitely fast computer would be self aware and wouldn't need instructions.
When Fascism comes to America, it will call itself Anti-Fascism, and tell you to give up your guns.
And GOTO, no GOSUB though, that's dumb
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.
Obliteracy: Words with explosions
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"?
sudo ergo sum
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.
Slashdot social media options: AIM, ICQ, Yahoo, Jabber and Mobile Text. Why no MySpace?
It should be a highly parallel language, where you can program with constraints.
There is no garbage collector in C, so it must be the ideal programming language ;-)
Special mention for assembly too.
"Science will win because it works." - Stephen Hawking
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!
This sig intentionally left blank.
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.
I came to the datacenter drunk with a fake ID, don't you want to be just like me?
An ideal programming language would support powerful features like the following statement:
print("Does P == NP?", P == NP ? "Yes." : "No.")
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."
Wouldn't an infinitely fast computer be completely useless in that doing anything with it would result in a race condition?
Obliteracy: Words with explosions
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 memory and storage resources at equally infinite reading and writing speed?
However, rfc1925:
(2) No matter how hard you push and no matter what the priority,
you can't increase the speed of light.
You should be punished for mentioning Paradox in a discussion of "ideal" programming languages.
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.
It must have been something you assimilated. . . .
Yeah, but really... I have always thought that, when I missed the semicolon at the end of the line, and the compiler told me "missing semicolon on line whatever," my first thought is "if you know that's the problem, why don't you just fix it, then?"
Stupid sexy Flanders.
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 be no companies left to build these infintitely fast computers.
I am sorry, I don't know Tim Sweeney, but that question brings up one of my own. How have we as a technical society managed to produce people with the implied logical skills that programming requires (and his wikipedia bio does indicate he is a competent programmer, even a good innovative one)
but who can't think a simple fallacious question through before tweeting it, or at least can't communicate the real question he wants to ask behind this ridiculous tweet? This is really a very fundamental logic flaw here. it is the equivalent of asking "if price were no object..." Given any infinite resource just do it how ever you want, it's not like you are going to run out.
"Proximity to wonder has blunted our perception and appreciation of it" --Tim Hartnell in 'Exploring ARTIFICIAL INTELLI
He commented on this idiotic click bait of an "article", he is being punished.
Sorry, teleporters just kill you and then make a copy. A perfect, soul-less copy.
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.
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...
The quote means "getting rid of having to worry about manually collecting garbage" (destructors, etc). Presumably the infinitely fast computers would handle all of these details in the background and the human interaction would be abstracted away from the computer towards more naturally-human ways of thinking.
Decided to wait ten minutes for the guaranteed litany of responses concerning garbage collection and how its removal would be the LAST thing you'd want to do..
Seems to me this hypothetical language is the one in which Elon Musk's universe is written. ;)
I guess he never heard of Wirth's Law. 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.
Computers with that much processing and computational power should be able to handle every programming task with natural language. I should be able to ask for a task to be completed without requiring me to program it in some other language.
Simply ask the computer to do every task. No HMI required other than voice command.
The language contains a single function, that takes anything as input.
This information is then converted to a single opcode that is executed on the computer.
Documentation: :: Do What I Mean
DWIM
Output := DWIM([any])
Converts, computes, or calculates the user's desired output given any input.
Example 1:
Arthur Dent executes the program:
Foo:=DWIM("Potted Petunia")
Foo now contains a perfectly brewed cup of tea in a fine bone-china cup with matching gold rimmed saucer.
Fully check input prior to executing. A null string will cause the universe to cease to exist.
Aside - Stupidity of this ranks up there with Superman vs. Thor, or similar kindergarten-esq "My Ghod can beat up / more powerful than your Ghod stuff."
Fred in IT
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?
---- The above post was generated by the Turing Institute. Maybe.
Never upgrade the hardware to run Windows ever again — I'll probably be out of the job as an IT tech.
library includes (why load separate libraries when the system is able to have all of them available?)
I can think of reasons.
The first is namespacing. A program needs to identify that it wants to use a particular library or security updates thereto, as opposed to a similarly named library without the needed functionality.
The second is copyright. A computer program is thought to be a derivative work of the libraries that it is explicitly designed to load.
The third is bandwidth. Even if computers are infinitely fast, radio frequency bandwidth isn't. It costs money to launch a satellite or build a tower, money that must be recouped from subscribers who may not be willing to pay for a large enough monthly data transfer quota to allow continuous retrieval of every library under the sun.
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...
"There is more worth loving than we have strength to love." - Brian Jay Stanley
So if I screw up and create an infinite loop this computer would complete the loop anyway in only one unit of time?
Unless you use a programming language that lets you launch GC whenever it's most convenient (not too many do so). Bonus points if you don't need system specific behavior to get access to your own telemetry (which lets you time it properly.)
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 not easy) to add new ones (think Smalltalk or Ruby).
1) The language would be graphical
No, physical. It would have one analogue keyword consisting of how hard you are hitting the robot with the stick, and/or how loud you are yelling "no, you stupid git!"
Someone had to do it.
GC doesn't mean infinite memory. It simply means the programmer doesn't have to expressly release memory.
One of the problem definitions was to increase human productivity. GC does this in spades. Is it any wonder why so many modern and high level languages have GC? Python. Java. C#. JavaScript. All lisps. Logic programming languages. CAS (computer algebra systems).
GC doesn't let the programmer allocate infinite memory any more than C lets you allocate infinite memory. The difference is that you no longer have any concern about deallocating it. Just like you don't have any concern about which branch instruction to use. Or how many bytes back the relative branch instruction is for this while loop. GC is simply one more burden that higher level languages remove from the programmer.
I'll see your senator, and I'll raise you two judges.
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.
"They were pure niggers." – Noam Chomsky
... bubble sort.
It little behooves the best of us to comment on the rest of us.
If they were 'infinitely fast' it wouldn't matter; you could write everything in interpreted BASIC and it wouldn't matter.
Oh it's even worse than that. If you have an infinitely fast computer you never need to program it because a simple random number generator can immediately simulate the effect of an infinitely number of monkeys typing on an infinite number of keyboards in no time at all. Not only will this give you every possible program in every possible language in no time but searching for the right one will be easy too - infinite speed is really useful....and as a side effect you will also produce the works of Shakespeare as well as every other author living, dead or yet to be born as well as their translations into every language using whatever symbols you have on your simulated keyboard.
So even if you ignore whether or not an infinitely fast computer is possible the question itself is logically inconsistent because an infinitely fast computer would not need to be programmed let alone optimized as you pointed out.
Static typing is not just about performance. It is also about program correctness and ability of your IDE to provide powerful refactoring capabilities.
I'll see your senator, and I'll raise you two judges.
If a language was infinitely fast, then any sequence or computation could be executed nearly instantaneously (1 Planck time unit?). That means no more offloading long-running tasks to separate threads, waiting for threads to complete, or even spawning a pool of threads to work in parallel. If a computation is near-instantaneous, then any number of them can be executed and still complete near-instantaneously! Inter-process communication between systems would still exist, but with computations competing near-instantaneously there would be no need to synchronize them. We get to assume that any computation from either system involved in IPC will finish before the next one begins. This will really make life easier. When can I have this new language??
Wow, it's hard to explain how wrong you are. Literally the only thing I agree with is point 3.
I have programmed products, real complex products, in graphical interfaces. Where you create a loop like you suggested. It is hell. I can type far faster than use a GUI. And I can edit text at many more multiples faster. Whether "English" or not, most keyword sets are in the under 100/200 words, and the libraries will have to be named anyway. Make it Dutch, and I'll just learn a couple hundred Dutch words.
Compilation is only a problem because it takes time. But it also catches whole categories of bugs. I admit it would blur the line between self-interperting and self-compiling code if speed was infinite.
Declaring variables used to be about processor efficency. Now, it's as much to catch programmers doing something stupid/allowing coordination among programmers as it is to tell the computer what to allocate. Try writing PHP code, and try accidentally declaring a new variable via typo, and then tell me how horrible declarations are.
Your ad here. Ask me how!
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.
Do not look at laser with remaining good eye.
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 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 and runtime environment would basically completely disappear.
There would be no files anymore, just "Objects" and no starting or stopping of programms, just saved "states" of objects or processes running in and on objects. Again, Squak or RunRev/LiveCode come close to this, but of course are a little flakey to be true contenders for the proposed computing utopia in the GP.
The best experiences I had actually were with Flash, although flashes timeline stuff always was a step backwards vis-a-vis hypercard, squeak and such. But still ... Need a loading bar? Draw one and apply something like >>bar.width = myFile.loading,percentage Done. Doesn't get any better than that short of the computer reading your mind.
I would love to have a Python or JS 2018 driven DMI/DME with triple-A 3D and Flash-style 2D vector graphics. Completely FOSS. That would totally rock!
My 2 eurocents.
We suffer more in our imagination than in reality. - Seneca
Take Python and Javascript. Make it completely unlike them.
Confucius say, "Find worm in apple - bad. Find half a worm - worse."
The first thing you will need is brakes. Pro: no more endless loops!
... with a friend where I was describing what I do for work. I design logic by coding algorithms in Verilog, which gets turned into CMOS circuits by a synthesis tool (effectively a software compiler that turns the programming constructs into CMOS circuits rather than pre-defined instructions for general purpose processor). But this is a very clumsy method of describing even the simplest things. At some point, we concluded, the synthesis tools will get good enough that I will need to merely describe to it at a very high level, perhaps just a spec document, or via a natural language "conversation", and then it takes care of all the ugly details under the hood to implement the idea and turn it the hardware.
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.
The language should allow full introspection and reflection as well.
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, simply discarding what isn't in the window.
AI would become easier: For a given problem, iterate through all topologies of neural network up to some constant size, train each one, and see which is the smallest that produces the 100% correct results on the training data set. That's likely to be the correct generalization of the problem.
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 question really is ill-posed. Even without infinite storage, infinite computation collapses the polynomial hierarchy. P = NP, P = PH and in fact P = PSPACE. You could fairly quickly boostrap your way to an AI that would let you describe (in natural language!) the actions you wanted the computer to take and have the computer either write the program or perform the actions directly. No clever programming needed during the bootstrapping, just brute force searches in polynomial space will be fast enough given an infinitely fast computer.
An infinitely fast computer requires PAUSE instruction.
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.
Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
At infinite speed a value may arrive at an indefinite state, and you would need a way to inspect this.
Getting rid of garbage collection? Why? There is no performance hit to it. The assumption is not that there is infinite memory.
ANSI C
Don't tell the computer what you want and it will still compute it in zero time.
That was kinda his point, the original question doesn't say you have infinite memory so there's no reason to get rid of GC, especially since you don't take the usual performance hit from it.
"Infinitely fast" means "divine" — the bottleneck becomes not the computer's ability to understand, but the human's ability to express the commands and instructions. Assuming, such omni-powerful computers would still obey me, I'd program them in Ukrainian. Or English... Does not really matter — being infinitely fast, the computer would be able to translate the programs from one language to another instantly.
Oh, and then, of course, they'd need to humans to program them at all...
In Soviet Washington the swamp drains you.
With an infinitely fast computer I could code an apple pie from scratch.
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.
You wouldn't have to program an infinitely fast computer, except the one time.
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.
Not being a programmer I have to ask:
Does infinite speed imply infinite resources? Does infinite speed imply strong A.I.? Because that is what most of the posters here seem to be saying.
Back when dinosaurs roamed the earth I took my first theoretical computer science class. The professor drew a Turing machine on the blackboard and said "This is the program that runs forever without producing any output. I'm sure you've all written this program." So what happens if my computer is infinitely fast? One typo and it does an infinite amount of nothing, consuming an infinite amount of power. So if my wiring is good enough I crash the electric grid, and if it isn't my house bursts into flames.
So what happens when my infinitely fast CPU finds an infinite loop?
I read the title originally as "if compilers were infinitely fast" and it actually made sense as a problem question to answer. When you say "computers are infinitely fast" the question becomes dumb because there are a lot of things you can do if computers are infinitely fast which would be dumb to actually do.
...where the ZIP file of your source code is already located. No need to code!
One could use a genetic algorithm to evolve a solution if time were not an issue. However, the hard part may be defining/building a ranking test.
Table-ized A.I.
Judging from the kind of requirements users often give me, a new computer language really needs to be telepathic. It has to know what the user meant - even when the user has no clue themselves.
It would help if the new computer language could do magic too. That's another user requirement I often get.
I am anarch of all I survey.
c:\programs\McAfee\Uninstall.exe
Table-ized A.I.
Since every calculation will release a finite quantity of energy, an infinite loop would release an infinite quantity of energy consequently destroying the universe. For safety, the programming language should avoid any looping functionality. Or memory allocation. Actually, probably best if there is a one week delay between executing any instruction during which it can be thoroughly analyzed by physicists for possible singularities.
When things get complex, multiply by the complex conjugate.
Studying them is part of course in "Theory of Computation" taught in Computer Science. https://en.wikipedia.org/wiki/... Interestingly, even with "infinitely" fast machines, there will still be problems that may not be computable. https://en.wikipedia.org/wiki/...
I think the #1 feature of the language would be something to slow the computer down a bit, otherwise games will be unplayable.
Nullius in verba
Floats, especially IEEE Singles, have a lot of weird problems. They're a compromise and rather difficult to use correctly. Why not go back to the old fashion computers where numbers are stored as a sequence of 6-bit values representing base-10 digits (extend BCD)? You can perform operations on numbers of any length of "bytes" on these old systems and really the main problem back then was it was freaking slow. If I can have arbitrary precision / bignum that scaled from 1 byte to many bytes and operations were fast then I'd definitely want that as my numeric type in the vast majority of situations. I can interpret it as an integer, fixed point, arbitrary precision or I can use two of them and treat them as a ratio for some rather slick properties for equations.
No longer would I have to pick some reasonably big maximum size for my loops (usually I use 'int' in C), the bignum can be any size and you can run my code on any size loop as long as you have log n bytes to represent the counter.
“Common sense is not so common.” — Voltaire
If computers were made of cheese, what would be the ideal relish to eat with them?
Telling the system: if I input "1,3,7,5,4", I want the output to be "1,3,4,5,7", or just "get me a sorting algorithm". Then the system searches all kinds of known algorithms and picks the one that does this task and is most commonly searched for in a context similar to mine. Then it proceeds by asking me "ok, but what would be your desirable output for '1,2,a'?". I think these days, so much programming actually seems to be recreating things that someone else has already done...
This might also work for what amounts to the biggest nightmare for me when learning new languages and environments - e.g. in Unity3D, I have this button and I have this variable, but being a complete newbie - when I push this button, how to make it change the variable. What are the correct names, methods, events? Again, can I program this by way of example or natural language search, and have the system take care of things like passing parameters?
In other words - superfast computers should just allow me to more easily find and connect work done by others (and released as open source, yippee!)
Also, you'd be able to experimentally prove or disprove halting for every possible program: a halting program will terminate instantly, and a non-halting one will not.
DoWhatIMean.
45 5F E1 04 22 CA 29 C4 93 3F 95 05 2B 79 2A B2
So basically, no matter how infinitely fast it is we would find a way to make it slow (network access anyone?)
Clearly we should first ask for is an IDE running infinitely smart and fast on that infinitely fast computer.
Programming is such a 20th century concept. Don't you feel like a mere peon, putting so much effort into organizing your thoughts into some framework that someone else has built, of some syntax and structure that someone else has thought of, to get some task of yours done? Irrespective of the complexity of the logic involved, the complexity of the application, the number of interconnected components etc, programming will ultimately be viewed as a plebian activity! I expect when systems are powerful, when the software / hardware combo is advanced sufficiently, you will *not* need to program anything, ever!
while(1) {};
and
int myfunc(int n) {
myfunc(n+1);
}
When the boss asks "Hows that research going?". I can honestly answer "The system is calculating away." then show him 'top' with processors pegged.
Not really the interpreter, but the language spec. Add the following: ...
- Ability to do static typing when needed
- Add optional dialect to use delimiters instead of whitespace for block and statement scoping that can be enabled and disabled within a file.
- Add ability to specify uniform and auto-vectorized parameters to functions and have the system auto parallelize, vectorize, dispatch to GPU,
Many of these may exist in other languages, but I haven't spent a lot of time looking. I'm mostly a c++ and Python guy. Groovy seems to have a lot of cool features, too, but I find it hard to learn because of the too-loose syntax rules.
Dan
Problem Exists Between Keyboard And Chair
GC is bad for all the reasons stated. Often you cannot just "throw another hundred GB of RAM"(???) at a system. It really does screw with application speed, I personally spent LOT of time tuning Java GC for both client and server applications so unlike your theoretical understanding I have a lot of real world battle scars from GC.
There is however a way to do memory management that for the most part does not involve the programmer. It's called ARC, and it works spectacularly well - used by Objective-C and Swift.
It's fully deterministic an imposes no more burden on the programmer than GC does - but at the same time you can for critical parts dictate exactly how memory allocation should work.
"There is more worth loving than we have strength to love." - Brian Jay Stanley
Give me an operator for those rare times when a reference is nullable ('?'), or a value is mutable ('!')
That's pretty much Swift. You can specify nullable with "?" (which turns out not to be that rare in practice), and it has semantics for mutable/non-mutability.
"There is more worth loving than we have strength to love." - Brian Jay Stanley
+1
GC creates more problems than it solves.
The knowledge/discipline needed to use GC properly isn't less than learning to use reference counting.
Worse: In a GC language you'll be retyping the exact same boiler plate code over and over gain to workaround the problem. This leads to copy/paste errors, code verbosity that hides other bugs, forgetting to do it, etc.
GC-enabled languages have *less* boilerplate and verbosity for the most part, because that nuisance housekeeping is handled for you. Unless you're stuck coding in Java perhaps. Many other GC-friendly languages are easy to read, write, understand, and trivially within the "good enough" ballpark for most use.
I agree that some knowledge is useful in terms of edge cases, profiling and tuning, but that's a bridge you cross when you need to.
Mod parent +1 Informative !
You've nailed the biggest problem with a GC -- it is non-deterministic.
If one could provide a _hard_ deadline of X milliseconds to the GC then more people would adopt it -- but right now you get non-deterministic pauses at the most inconvenient time. GC makes for a shitty User Experience.
Forget languages, all you need is one single program that takes an input spec and an output spec and brute forces it's way through every possible program until it finds a solution. However, given that this would be an infinitely large search space, it cannot be determined that an infinitely fast computer would search through this in a finite period of time. So an infinitely fast computer might not be as powerful as it sounds.
On the other hand, an infintely fast computer could perfectly simulate an infinitely fast computer (could perfectly simulate an infinitely fast computer (could perfectly simulate an infintely fast computer .. ))... which would get you infinite geek cred.
Eclipse would still take minute to load though. No way around that.