In what way is a programming language powerful? And how is it more powerful than another? Can't a program be written in any language?
Shopping Cart Returner Shirt $21.68 |
Shopping Cart Returner Shirt $21.68 |
In what way is a programming language powerful? And how is it more powerful than another? Can't a program be written in any language?
Shopping Cart Returner Shirt $21.68 |
Shopping Cart Returner Shirt $21.68 |
Depends on the language
You can only write some low level system stuff in languages that support raw memory access. Interpreted languages generally can not be compiled to run on bare metal.
So is low level more powerful than high level? And is compiled more powerful than interpreted?
In general that is accurate, lower-level languages also being more complex.
So the power is the ability to access lower levels that other languages can't? And being more complex?
C isn't complex
It isn't, but it has become more "complex" by modern standards. Things like maps and string manipulation require more effort to implement
>Interpreted languages
don't exist. languages are just a spec, compiled vs interpreted is an implementation detail.
>is low level more powerful than high level
meaningless terms. C used to be called high level, modern high level languages were once called "very high level."
you can write assembly that does everything a C program does, but it'll likely take longer and you'll have to write it per architecture; you can also write it in Python and it can potentially be written significantly faster than C in exchange for a performance hit due to Python's implementation. which is "more powerful"? power is a buzzword on IQfy, it doesn't mean anything until you apply your own definition of what it means. is it speed? ease of use? metaprogramming? verifiability?
the more important question is which language is most useful for your current task. if you ask anything else then you're already making a mistake.
>Can't a program be written in any language
yes, assuming they're Turing-Complete (basically every language you commonly see is). the only real differences between languages are how easy they make certain tasks via their semantics.
>the more important question is which language is most useful for your current task.
>My preference has always been for languages that let me clearly express solutions to very specific problems.
>All of that depends on what is your purpose of using said language.
So any and all languages can be more powerful than the others depending on circumstances?
the point is, "powerful" doesn't mean anything. if somebody says "X is more powerful than Y," then they're just moronic.
This. For me, powerful would mean it lets me get shit done as quickly as possible
for me there are two types of power.
the ability to build solutions quickly
and the flexibility of the language
if a language doesnt have either, its a weak language
So something like cobol is not powerful but something like python is? But could python replace cobol?
hey i didnt write all languages equally powerful are interchangeable
also cobol? wtf?
afaik the only reason you'll ever encounter cobol its bc of legacy shit like banking stuff
I just assumed that a language that is more powerful than the other should also be able to replace it and even do better.
heh yeah.
thats not what i meant.
>COBOL
My friend's dad is a COBOL, C, and C# programmer for a living. The guy gets paid something like $350k a year as an independent consultant to program for banks. Banks refuse to move onto something else and will pay through the nose for expert COBOL programmers.
The man seems to be constantly on the ragged edge of sanity, but he daily drives a Lamborghini worth $150k or more, and got me a $4500 laptop because I mentioned off handed one day that my old laptop just isn't cutting it anymore. Just fricking gave it to me.
key word in your post: expert
if you arent among the best, cobol is no more than a novelty
banks pay big money. but they have big expectations in return
oh yeah, there's really no such thing as entry level COBOL jobs lmao. Funnily enough, friend's dad trained under a COBOL master. Like literal journeyman/recognized as a master tier shit. The guy who taught him was also a bit crazy. Personally I think becoming one with the COBOL is like getting a glimpse into madness. Every guy I ever spoke to who did COBOL shit for a living was a bit off.
>COBOL is like getting a glimpse into madness.
if you stare into COBOL
COBOL stares back at you
1. That's a shit adjective to use
2. See 1
3. No, while all relevant languages are Turing complete allowing the execution
of any logic, the hardware is not an abstraction.
The closer it is to 1s and 0s the more powerful it is
But how is it powerful? What is the power?
Cause the programming language ends up as 1s and 0s in the end.
The more work it needs to do to become 1s and 0s the slower it is.
Like python is converted into C and then bytecode and then 1s and 0s I think.
So that's an extra step.
So the power is speed? But then they would just say fast, not powerful.
in the world of programming, fast means powerful. Depending on the language and the use case, one may require 1/10 the processing power to accomplish the same job as a higher level language. I.e. Assembly vs Java. With lower level languages, you can make a program or routine that is extremely resource friendly and runs without fault but it requires a shit load of know how and experience on part of the programmer. Something more forgiving like Java or Python will probably still allow you to do the same job, but it will be far more bloated and resource intensive.
Thanks, I think I could settle with this explanation.
When people call a language "powerful" today they usually more or less mean a language with closures. Closures are a way to create a new stack/context on a function basis, and so they enable a lot of interesting things: coroutines are a subtype of closures, OOP can be represented with closures, etc
What people seem to want in a language is the ability to do many things, with few lines of code. They like to sacrifice speed to create very general solutions to problems. My preference has always been for languages that let me clearly express solutions to very specific problems. "A computer can do anything, but a computer cannot do everything"; "powerful" language people who shoot loads over closures and talk about lisp love to try and make their computer do everything
All of that depends on what is your purpose of using said language. Programming languages are tools, not idols to venerate and crucify those who are in opposition.
>THE X LANGUAGE IS BETTER THAN Y LANGUAGE BECAUSE MUH FUNKY PARADIGM
>THE Y LANGUAGE KICKS P, Q AND R LANGUAGE BECAUSE IT PROCESS DATASETS BETTER AND FASTER
Like stfu. Pick a language appropriate for the task at hand. Of course, always have a main programming language that you are 100% comfortable using
in short; all programming languages are tools. just like real tools, you could use any one of them as a hammer, if required. but you might want a dedicated hammer, and a dedicated knife, and a dedicated screwdriver, and so forth.
i think power in a language depends on the application you want, but with that said a complete toolbox is more powerful than three screwdrivers, a pair of pliers and a hammer sitting in a shopping bag.
interpret this how you will.
by the way i code in visual basic because real C scares me in the same way a 9" angle grinder scares me
>In what way is a programming language powerful?
Imagine you could speak german with a processor instead of english.