[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Why are programming language syntax so different? why can't

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 162
Thread images: 12

File: Python.png (34KB, 502x270px) Image search: [Google]
Python.png
34KB, 502x270px
Why are programming language syntax so different?

why can't they all be like python?
>>
Python does in one word what requires three words in java.

Those three words converted into the micro seconds it takes to type them translates into months of time lost over a lifetime.
>>
python is garbage tho
>>
>>59306178
>Why can't all modes of transportation be the same thing all the time like riding a unicycle
This is you OP
>>
>>59306302
well at least it wasn't a food analogy
>>
>>59306220
why the fuck do poeple give a shit about print, you think fucking real programmers give a fuck about PRINT fucking PRINT SHUT THE FUCK UP NIGGER , fuck you , none gives a fuck about print , java is way more powerful and used than python cause its strong language ,python only has print and begionner retarded shit going for it u nigger stfdg
>>
>>59306494
I just had lunch
>>
>>59306527
Print is one of the most important functions in any oop language.
>>
>>59306178
>why can't they all be like python?
Because python has a ton of amateur language-design mistakes. That idiotic significant whitespace is number one on the list.
>>
>>59306670
In fuckin kindergarten not in serious tasks
>>
File: standards.png (24KB, 500x283px) Image search: [Google]
standards.png
24KB, 500x283px
obligatory
>>
>>59306691
What's further on the list?
>>
>>59306877
Unicode is universal though
>>
>>59306527
>>59306709
please stop
>>
>>59306920
Unicode a shit

Speak English and stop using emoticons, you fucking shitskins
>>
>>59306920
>Unicode is universal though
well it isn't.
>>
>>59308389
>don't speak your national language, speak our national language
>>
>>59306691
>That idiotic significant whitespace
one of its best features.
You just don't understand it. 2deep4you?
>>
>>59308422
Yes.

The language of economy and technology is English. Your language exists to shit in streets
>>
>>59308572
Many people don't give a shit about the USA, why do they need English?
>>
>>59308422
just ignore their shitty bait
>>
>>59306178
>>59306220
When you have a loosely typed language like Python, you're more prone to bugs and errors.

With Java, there is more rigid structure that must be followed, which results in fewer bugs, which results in higher quality software. This is why Java is being used for self driving cars, because bugs in software can lead to deaths.
>>
Dug
>>
>>59306527
print("kek")
>>
>>59308843
so just put a couple roach motels in the car or somethign
>>
>>59308843
>java
If I was making a self-driving car I'd just use C instead
>>
>>59309234
Why? Java is faster to develop for, is less prone to bugs, and can run faster than C in some cases.
>>
File: Self-driving-car-negligence-law.jpg (57KB, 450x299px) Image search: [Google]
Self-driving-car-negligence-law.jpg
57KB, 450x299px
>System.out.print

What kind of turboautist thought this was a good idea?
>>
>>59306178
Because different languages are made for different uses and have different needs.
>>
>>59306877
>xkcd
REDDIT
>>
>>59306178
Because python is shit.
>>
>>59309296
In Lisp, this is just print
>>
>>59308619
Just like you ignore the feces covering your streets
>>
>>59306178
Why can't all dicks be like my BBC?

Whitey will never know.
>>
>>59306877
i kek'd
>>
Yeah, Python is such a pretty language. Until you have to actually look at someone else's code. Python is about as self-commenting as Perl. And Python coders are too busy jacking off to how few symbols they're using to actually add comments because that would get in the way of their "pretty" code.

Narcissistic, that's the word. Python is a narcissistic language.
>>
>>59309274
Low latency, low memory, no GC.
>>
>>59308843
>>59309274
>use Java for car:
>swerveToAvoidPedestrian() method called
>stops for garbage collection
>ends up hitting someone
>>
ITT: People that have never worked for a company. Python is useful for scripting things and making small programs.
>>
>>59310561
You can manually avoid garbage collection from happening. Learn actual java?

Not that its the correct language for the scenario you're describing, you're correct about using c or c++.
>>
>>59310561
>Use python for a car
>Takes 5 seconds to run what could be 0.1 second in C
>Crash and die
>>
>>59308532
what's the : for then?
why do you have to import
every.
single.
thing.
>>
>>59310561
>swerving ever
It's like you want to crash
>>
>>59306709
idiot
>>
>>59308361
>>59308361
t. python toddlers
>>
>>59310727
you, really, don't, have, to, faggot
>>
>>59310717
use ctypes or cython all of the countless ways to fix this
>>
>>59306178
Different languages cater to different uses and needs.

>>59306220
Java is strongly typed and you have to be specific, and honestly I think that's better because it generates less unexpected behaviour.

>>59306527
Anon, your autism isn't funny anymore.

>>59308389
How does it feel to be that uninformed about the world?

>>59310561
I paid for the car, shit better not swerve, fuck those peds for jaywalking.
>>
>>59306178
So different? Really now? Last I checked most languages use c-like syntax.
>>
I present to you The Recipe:
1. python-pypy for everything
2. java for android
3. js/node for front-end/web
4. C++ for perfomance/team projects
5. C/Asm for critical perfomance and general catharsis
6. Fortran for number-crunching
7. all other langs are pretty much useless atm, sorry. don't get butthurt, its not my fault you don't do research before you commit.
>>
File: 1022stocks.jpg (272KB, 1820x1032px) Image search: [Google]
1022stocks.jpg
272KB, 1820x1032px
Python is the Ruger 10/22 of the programming world.

>Good way to learn the fundamentals and basic rules
>Simple and reliable
>Everybody has at least some experience with it
>has a niche where it's useful, but very limited
>definitely "the real thing" but not as high-powered and therefore not as versatile as more advanced common options
>If you want to spend the time, you can rice it out to look a lot like other things thanks to tons of extras and community support.
>Will leave you wanting more after a while but you'll still keep it around when you do upgrade.
>>
>>59309274
>can run faster than C in some cases.
>>
>>59311825
That "P90" though
just put it out of it's misery
>>
>>59306527
>Being this autistic
>Being this retarded
>>
File: IMG_8701.jpg (1MB, 3547x2550px) Image search: [Google]
IMG_8701.jpg
1MB, 3547x2550px
>>59310561
>>
>>59312129
>Passing in a void
Just.....why?
>>
>>59312231
> Not knowing how C works
>>
>>59312289
These are the same people that shill rust
>>
>>59311973

Further proving my analogy.

The more fancy and "real language"-like you try to make Python programs look, the more of an abortion they become.
>>
>>59312129

if(crazyMurderingRobot==true){
>>
>>59312422
>i am very smart
>>
>>59306220
But then Python is slow as fuck so it all balances out
>>
>>59308843
>>59306220
>>59311615
Luckily, there are languages that are both safer than Java and more expressive than Python -- those in the ML family. Give one a try.
>>
>>59310561
https://en.wikipedia.org/wiki/Real_time_Java
>>
>>59312289
> Implying that is the way it should work
>>
Python is not bad, I use it a lot at work. I also use Ruby a lot at work, and I greatly prefer it to Python. I especially prefer Rails over django, but most of work is on scripts and small services with no front end.
>>
>>59312801
Also prefer Sinatra to flask
>>
File: izgklIv.gif (2MB, 480x320px) Image search: [Google]
izgklIv.gif
2MB, 480x320px
>>59309234
>C
>buffer overflow
>car explodes

Nah.
>>
>>59308614
>don't give a shit about USA
>want to use American technology
Pick one.
>>
>>59311593
Or you could just use fucking C, holy shit.
>>
>>59309274
>can run faster than C in some cases.
>if we a sort function in C using bubble sort, and a sort function in Java using quick sort, Java beats C by a little sometimes!
>OOP programmer logic
>>
>>59312696
Why shouldn't it? This strikes me as a minor detail of C, not the kind of thing to get mad about one way or the other.
>>
File: 102106832-492559195.530x298.jpg (25KB, 530x298px) Image search: [Google]
102106832-492559195.530x298.jpg
25KB, 530x298px
>>59308572
>The language of western economy and technology is English.
ftfy
>>
>>59310331
Not to mention that because the entry bar to Python is so low, lots of retarded "programmers" use it, and they end up writing shitty code. Just today I had to read some idiot's code for a class, and not only was he writing software, it was also in a Python tutorial text on sorting algorithms. Nigger had inconsistent, nigger dick long variable names, superfluous variables, inconsistently put whitespace around operators (not using whitespace around most operators is bad enough, but this nigger had whitespace around some, and none around most), and in general just made it look bad.

Fuck Python programmers.
>>
Why can't languages have as uniform syntax like Lisp?
(function arg1 arg2 arg3 ...)

Everything in the language follows that form
>>
>>59312933
And this is why you shouldn't be writing any code in any language without using a proper linting plugin in your editor. A linter will improve your code and skills as along as you don't ignore it. Enforce style rules too.
>>
>>59306691
getting mad about the whitespace is probably the stupidest thing to get mad about
>>
>>59312945
yes, and why can't assembly be nothing but scoped NAND commands?
>>
>Anno Domini MMXVII
>Not using Scala

Come on, anons
>>
>>59312873
>USA uses USA technology only
>>
>>59313528
>using any language with curly brackets

anon pls
>>
Let me give you a basic gestalt...

LISP is the only true tool of the code artificer.
>>
>>59312507
CPU time is a lot cheaper than my time.
>>
>>59312901
Yes, but you are still avoiding the point: It is fucked up. Therefore, you should fix it, but they choose not not. Care to explain why you would not fix an obvious problem? (Other than the obvious fact that the language sucks nigger dick.)
>>
>>59314797
This little minor detail is not a problem and doesn't need fixing. That's just how you declare a function with no arguments in C. Not a big deal.
>>
I'm a beginner in terms of programming. My main issue with Python is that it doesn't compile a Windows executable. Is it solvable in any way? Its not encouraging when you can't easily share tour results without convoluted roundabouts.
>>
>>59308422
America doesn't have an official language.
>>
>>59315415
PyInstaller
>>
File: matrix.jpg (58KB, 493x340px) Image search: [Google]
matrix.jpg
58KB, 493x340px
>>59306178
Why are you a drooling mongoloid who cares about syntax at all? You'd probably hang yourself if someone made you program in APL, faggot.
>>
Python syntax is shit
Fuck off with your retarded tabs
>>
>>59306178
There is no reason to not use python it's the simplest one.
>>
>>59312422
thats the joke
>>
>>59306527
You are right, but need to turn the heat down lad
>>
>>59310727
> from ur_a_fag import *
Voila fixed for you ;)
>>
python has the fucking worst syntax of any language ever lmao
>>
ITT: Java brainlets damage controlling their cs 'degree'
>>
personally I like perl
>>
Use c ++ print it cout << "hello world!" << endl;
>>
>>59317646
kek
>>
>>59317646
at least they're employed
>>
>>59315415
As >>59315847 said, PyInstaller works pretty well. Or you could switch to Go, as so many Python programmers seem to be doing these days. If you're a beginner, experience with a simple static type system will probably do you good.
>>
>>59306178
Why are programming language syntax so different?

why can't they all be like lua?
>>
>>59308942
kek
>>
>>59306220
>Those three words converted into the micro seconds it takes to type them translates into months of time lost over a lifetime.

I spend more time thinking about my programs than creating spaghetti code, so that's never been an issue.

>>59309787
This. If you judge Python by its constructs as a language, it's shit. If you judge Python by its performance, it's shit. Go, Java, etc. are rolling out concurrent garbage collectors while Python still has a fucking GIL.
>>
>>59306691
>That idiotic significant whitespace
A harsh way to talk about bare minimum sanity.
>>
>>59312933
you could just say "not pep8" and give it a 0.

thats what they did in my classes
>>
>>59321338
>lua
nice taste anon
>>
File: file.png (123KB, 850x400px) Image search: [Google]
file.png
123KB, 850x400px
>>59306178
>why can't they all be like python?
>>
>>59324051
pep8 is garbage though.
>>
>>59309759
stfu, it was far before
>>
>>59312129
that image helping a lot
>>
>>59323200
>t. semicolon fetishist
>>
>>59309234
>C
>self driving car
why not kys right now?
>>
>>59306178
Python is BASIC with shitty syntax. Real Devs use BASIC! Fact!

They didn't want to call it Basic-whatever.. so they called it Python after monty python's flying circus.

Python = Basic get used to it!
>>
>>59306527
Oh look it's the java know it all nigger.. Fuck you retard, java sux and you know it, that's why you get so triggered.
>>
>>59306691
I have to agree.. The mandatory white space as part of the syntax as opposed to style is completely moronic, Not to mention, makes debugging nightmarish..
>>
>>59326817
It teaches you discipline and patience.
>>
>>59306901
Local by default variables and not having to declare variables before using them. Generators are tied to the C stack and can't maintain their own stack so you can't call yield from within multiple call levels. GIL, while not standard, the language's semantics make it hard to avoid (even if its not used, the implementation must behave in a similar manner) except in a handful of instances. Lambdas and functions being different types. Read the LtU post on JIT compilers and how python is incapable of being JIT compiled.

Python was grown and cares too much about backwards compatibility. When taken together that make a rigid and completely shittily developed language with tons of features to get around the corner cases and fundamental feature lack imposed by previous development under that scheme.

The answer is Lua. Lua avoids ALL of the above issues.
>>
>>59306178

>python
>strings

I need to use strings and don't want to use a dead language stuck on version 2.7
>>
>>59328885
This post literally makes 0 sense
>>
>>59328935
Do you have a legitmate autism? Because I understood right away what he was referring to
>>
>>59328972
by him you mean you
>>
File: 04.png (18KB, 650x430px) Image search: [Google]
04.png
18KB, 650x430px
>>59328987
...just no.
>>
>>59328972
KYS samefag
>>
>>59329090
4chan should already invent a hashsum of own posts or something to I could proof to idiots that I'm not samefagging replies to my post ... angry pyhtonfags stay mad
>>
>>59306220
void print(String str) {
System.out.println(str);
}

Fixed.
>>
Python doesn't even have a stable threading model.
Fuck off.
>>
>>59329178
Why are you lying?
>>
>>59320256
I have a job writing in node

I make more than any cs baby could dream of
>>
>>59326817
>write a simple script with a few functions
>use tab to organize shit
>accidentally hit space one time
>spend 30 minutes debugging perfectly fine code because of fucking space
>>
>>59314435
TFW you use R and Scala almost exclusively.

curlybracketscurlybracketseverywhere.jpg
>>
>>59306178
>Why can't all programming languages be python?
>I only know python, I don't want to learn anything else.
>>
>>59306920
Also easy to fuck up.
>>
File: hqdefault.jpg (22KB, 480x360px) Image search: [Google]
hqdefault.jpg
22KB, 480x360px
>>59306178
What were they thinking with that logo?
>>
File: python_logo.png (45KB, 800x800px) Image search: [Google]
python_logo.png
45KB, 800x800px
>>59331251
They were thinking about a pajama-wearing fat man on a bean bag chair.
>>
>>59331251
Literally the best logo in existence
>>
>>59331251
After all these years. I see the light
>>
>four different string formatting methods

THERE IS ONLY ONE WAY TO DO THING!!
>>
>>59306178
Haskell has the same minimalist style but is even better, I haven't yet seen any language better than haskell. It's terse, efficient and easy to prototype in and easy to perform optimizations or parallellism. Are there any downsides to haskell except the non-argument that it's an academic language?
>>
>>59336495
Compiling numeric code is slow as shit and space "leaks" are hard to eliminate.
>>
>>59336300
Not my fault you're a brainlet.
>>
>>59336495
>the non-argument that it's an academic language
It's not a non-argument. You just don't know what it means.
>>
>>59306220
>write print and ctrl+space in 0.2seconds
>months of time lost over a lifetime
Just why are you writing so much code that has to print?
>>
>>59329876
use a pep8 checker before running code.
>>
>>59306527
System.out.println(">.kek")
>>
>>59314485
Only if you're a brainlet
>>
fuck dynamic crap.
long live static languages!
>>
Try MATLAB, it's even better syntax-wise.
>>
>>59306178
programming languages are very similar.
Most of them is nearly identical to C.
You can usually learn the syntax in an hour.
>>
>>59306241
ding ding ding
>>
sure buddy
>>
>>59317075
>program in APL
Why would anyone do that?
>>
>>59311776
>7. all other langs are pretty much useless atm, sorry. don't get butthurt, its not my fault you don't do research before you commit.
why don't you share your research?
>>
>>59313049
what
>>
>>59310331
Looks like somebody doesn't understand list comprehension
>>
Because it's a scripting language and has no real multithreading.

It's great for prototyping applications but if speed actually matters you'll need to choose something else.
>>
>>59324051
You misread my post. It wasn't a student. I'm taking a data structure class this semester, and the example code for a sorting algorithm in an online tutorial was like that.

The instructor actually gave up on it because most of my classmates couldn't read it and pulled up the same algorithm in C++, and they could understand it better despite barely being able to program Python.
>>
>>59326817
My biggest gripe with the mandatory white space is that the interactive interpreter is a bitch to use. That, and sometimes I write a loop or if statement that doesn't have a body. Not often, but it's nice to be able to just slap a semicolon on the end of it if I do.
>>
>>59328872
Lua is a pretty comfy "powerful" scripting language. Plus it has a nice C interface.
>>
>>59306527
>>59306302
>>59306220
>>59306241
>>59306178
I made a program in python today in a crunch in less than 30 minutes that reads emails and sends out text alerts, then moves the email to deleted after logging it.

C/PHP/Java can suck my left nut.
>>
>>59341964
I can do this in PHP in less than 10 minutes
>>
>>59342635
No you cant'
Thread posts: 162
Thread images: 12


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.