How autistic does one need to be as to enforce one's obsession with code indentation in a programming language?
And how do you Py-fags deal with not being able to figure out where a set of code ends and begins? is there a tool to mark that or did the creators figure an autistic way to force you to check every single line of code?
>i'm an undergrad comp sci student who thinks he knows something: the post
Alexander Lopez
The indentation becomes a non-issue when you use it frequently.
Jackson Mitchell
>TFW the white man is oppressing pajeets with proper code indentation
Blake Fisher
>How autistic does one need to be as to enforce one's obsession with code indentation in a programming language? Not at all. It's by far the least bad aspect of Python and it's by far not the worst way to implement indentation based syntax.
How autistic does one need to be to feel oppressed by a programming language enforcing indentation?
Xavier Reyes
>not being able to figure out where a set of code ends and begins Care to elaborate? I didn't use python much, but when I did, I had no issues reading/writing code whatsoever.
Noah Campbell
Python code is some of the most readable code out there.
Evan Clark
>copy code >paste back in >nothing werks Fuck Python.
>implying pajeets don't use python If you want to minimize poo exposure choose C or C++.
>see pic
Austin Butler
How Autistic Does One Need To Be As To Use Spaces And Punctuation Properly To Communicate With Others
Jose Bailey
I always see some people complaining about pasting python, and yet I never had any issues with that myself. It's a mystery.
Caleb Morris
It's bloated as fuck. 500 thousand lines of Python interpreter does the same thing twice as slow as 10 thousand lines of Lua interpreter.
Connor Jones
Well not really, but you are right if you meant to say that CPython is a meh-tier interpreter if there ever is one; right after most scheme meme interpreters.
Michael Martinez
> Copy-pasting code You sir, are in no position to belittle programming languages as long as you are not capable to write independent code
Evan Morales
AFAIK CPython is the most widespread one.
Ryder Adams
Python is A E S T H E T I C. I'm glad they enforce indents. It really cuts down on time when reading someone else's code.
Benjamin Green
This.
Eli Gutierrez
Some ideas for even better programming lanugage:
> remove colons, they're unnecessary > enforce naming convention (all types must be PascalCase, all variables and functions must be camelCase, all constants must be ALL_CAPS > enforce proper formatting (if it doesn't conform to PEP-8 don't interpret it) > enforce documentation (if every function, every argument of function and so on isn't documented, don't interpret it)
Adrian Jenkins
also > prohibit semicolons, every statement has it's own line > prohibit statement on the same line as : enforce consistent indentation style
Matthew Cooper
Pretty sure V8 is more widespread. Along with a lot of other stuff.
As for Python interpreters: Of course it is, there actually is no choice. There is: - CPython, while technically better to be buried, the only complete implementation - PyPy, rocket science by a lot of good people and still fails to deliver, thanks to CPython (friendly reminder: a programming language is NEVER independent of it's implementation) - micropython, a fucking mess, following CPythons footsteps, but for microcontrollers, apparently developed by similar clueless devs - lot of derprecated legacy garbage like Jython or IronPython - Cython and Nuitka, to get decent performance you have to deviate from Python semantics, even more so than with PyPy
Nathaniel White
That's nice and all but how about static typing first. That's the most crucial thing I miss from Python.
Samuel Evans
also > static, most of the time inferred typing > static types, getting rid of metaclasses > no self garbage > state of the art tracing gc instead of rc + gc at end of execution > fast binary compiler based interpreter
Brody Moore
Sup Forums Writes a programming language
Henry Jackson
>Copy and paste code >Nothing works Is it hard being retarded?
Liam Perry
That almost exist under the name Nim. Too bad it suffers from its own share of obvious flaws.
Ryan Powell
You're being hysterical/retarded.
There's optional typing available.
There's plugins available that will fix that shit if you really have trouble with pasting Python code.
Michael Johnson
>There's optional typing available. The useless kind, to be precise.
Leo Peterson
>Nim Nim is an existing language though? nim-lang.org/
Robert Diaz
By "almost" I meant it is not quite an improved Python but its own language.
Julian Bailey
I was trying to make fun of the language using the slippery slope, but some people took me seriously
Bentley Nelson
Oh I thought you meant Sup Forums almost made their own language.
Isaac Gonzalez
Well, there were some attempts. Their logos were finished, so I'd call them successful by Sup Forums standards.
Elijah Murphy
Fuck Python and pyfag shills and their pleb scripting language.
C++ is bae code for patrician coders.
Carson Perry
new to Sup Forums how was this done?
Wyatt Sullivan
with code bb-code tags
Luis Phillips
can you give an example?
Zachary Jenkins
Your code here. Let's hope that works.
Hunter Martinez
Nope, it ate nested bbcode. Basically you write and an ending tag with a /.
Carter Thomas
Actually, it seems you don't need to close those. Well, I'm in no mood for finding out the fitting escape sequence, so basically you put brackets around "code".
Alexander Carter
>> enforce documentation (if every function, every argument of function and so on isn't documented, don't interpret it) /* adds the value specified by parameter "amount" * returns the */ int8_t add( // the value to add int8_t * amount ) { // TODO check for overflow // increase the stored value by the specified amount dataDelegate->amount += &amount; return 0; // indicates success }
Lucas Clark
you know, screenshots are a thing
(testing)
Benjamin Sanders
(╯°□°)╯︵ ┻━┻
Luis Rodriguez
Yeah, but that requires efforts I'm not willing to take. Come to think of it, also typi
Caleb Hall
...
Jace Rivera
[reeeeeeeeeeeeeeeeeeee]
Nathaniel Lewis
fine, whatever
Gabriel Wilson
I'm thankful and yet I still hate you so..
thanks, I guess.
Dominic Collins
>I'm thankful and yet I still hate you so.. That's the Sup Forums magic.
Cooper Gutierrez
When you have a function or some block of code spaning two heights of your screen for example, how does that work in python? Is it impossible to track everything down when there are no brackets to signal you where is what?
Caleb Cox
thanks based jerk senpai
Dylan Stewart
Chill out, it's just a toy language for first year students, like visual basic with training wheels. You can forget about it after that.
Eli Rodriguez
▲
Hudson Adams
penis
Dylan White
It managed to dethrone Perl though.
Gavin Taylor
I don't know what I hate more about python. The underscores, the unicode crap, the module system, the forced indention or the way classes work.
How people choose this as their favorite language is beyond me. I'd gladly take a job programming in an old PHP version over python.
Evan Watson
>it managed to dethrone a toy language for admins that only looks the way it looks because larry is edgy as fuck with his bibles in his pants That's not untrue, but I'm insecure if this is a good measure.
Isaiah Ross
Python is shit, but not for the reasons you think.
Andrew Evans
Well played.
Jose Brown
someFunction(self)
Ayden Davis
Actually that is one true point, you need to re-indent your code when you paste something in. It only takes a few seconds for a few lines and it really isn't a big deal. I quite like the neat indentation but it could be a bit of a pain to some.
Aiden Jones
You should indentate anyways so might as well enforce it.
However copy pasting can result in some errors if you don't pay attention
William Taylor
>hey looks guys we made a language in which OOP is very important >len(mystring) What did they mean by this?
Samuel Gonzalez
This is almost literally Ruby. Especially the Rails framework which enforces class file names like java
Kevin Murphy
All the OO features of python feel like a tacked-on afterthought.
Easton Rivera
>PascalCase >camelCase holy shit fuck off
colons are trash though, continuation characters like \ or & should be the standard, an otherwise newline terminated line should always be considered terminated
Isaac Parker
This.
Julian Reed
This. Ruby is just as fast (or slow) as Python but at least it doesn't half ass OO and the syntax is just much nicer. Also because it doesn't force indentation it can do some aesthetic shit like "x = y if condition". And I like the inverse control flow things like "unless" and "until" in addition to just if and while. Also blocks are great and Ruby had symbols.
It's just too bad everyone makes Python libraries except in web dev
Jason Evans
>continuation characters like \ or & should be the standard, an otherwise newline terminated line should always be considered terminated This
Isaiah Smith
I like it because it's something fresh - something different from C family languages.
Nicholas Martin
>There should be one-- and preferably only one --obvious way to do it.
This is just in: Some people like syntactically significant whitespace, others don't.
I REAPEAT: Some people like it, others don't!
We can not be sure what this all means yet, stay tuned. We'll inform you when we understandthe further implications of this SHOCKING new turn of events..
Chase Gray
>not being able to figure out where a set of code ends and begins? Whether you like the forced indentation or not, it's difficult to argue that it doesn't make it obvious where blocks start and end.
Also, even though I'm really not a fan of the forced indentation, I do like the part of it that enables me to not waste lines on end-braces.
Ayden Sullivan
>copypasting code Let's just imagine that you're not just pastashitting all over your code as is rather talking about moving code around. Then it is true that you may need to reindent the code at the target location.
However, do you not do this for other languages? Do you just leave it at a non-matching indentation? If so, literally kill yourself even more acutely than if you were pastashitting.
Aiden Harris
>as and*
Xavier Anderson
>lot of derprecated legacy garbage like Jython I'm actually using Jython, and it is by no means deprecated. It doesn't have the resources of CPython, but it is in active development, and if you can use it, it's actually surprisingly nice. In particular, you get rid of the GIL.
Elijah Foster
>friendly reminder: a programming language is NEVER independent of it's implementation C has a couple of fairly different implementations, for sure.
Jacob Myers
I only used it during a course I was forced to take on user interfaces to troll the people responsible for assignmnents who demanded we use JavaFX
Ian Lee
I'm generally with this guy here: I also think Ruby is more logical and easier to use.
But recently I've tried to grasp the reasoning behind Python and it's not as bad if you understood the differences.
Ruby is centered about the thought that you always ask objects to do things:
a = Blah.new a.do_this.do_that.length.to_s
..and so on.
But Python is centered about functions. It's more inspired by languages like pascal. Everything that can be put in a separate function shall be put in one!
You can even see this in the iterator models: -Ruby does something like "3.times {}" and then you use each iterating number as the object you want to give orders to. -Python uses list comprehensions, where you are not interested in the single object that much, but more in the Set.
My feeling is Ruby syntax works more "from inside to outside", cascading the result of an operation to the next outer level.
Python syntax works more "from outside to inside", trying to do wrap things in functions and trying to be as abstract as possible.
Decorators are a good example here: you manipulate things by wrapping stuff around. In Ruby you would maybe rather accomplish the same thing by defining the decorator INSIDE the object and tell the object to "decorate itself".
Of course you can use the "Ruby way" in Python and vice versa. But that messed up my head and my Python code often felt "wrong".
So today I try to use a different mindset. You know starcraft? Ruby is the Protoss: -powerful objects -simplicity by code encapsulation and clear responsibility
Python is the Zerg: -a lof of small functions -simplicity by doing a lot of simple steps
David Sullivan
The first to are obvious to someone who knows python (and are 2 different things). The others are hacks intended to do other things. There should be one obvious way to do one thing, not one way to do many things.
Matthew Green
I do not know ruby enough to know whether that analogy makes sense, but I guess I can see python making small functions/codeblocks easy with lambdas, list comprehensions, dicts, and small functions
Jose Howard
>talking shit about based larry hope your mother dies in her sleep tonight
Landon Long
Well, it's just my personal thoughts. Ruby also has a lot of lambdas, but they are kinda "hidden", so you don't realize that you are actually use them. And that's exactly my feeling: In Ruby "functions are merely properties of objects", in Python objects are "merely the storage for functions".
Ahh, it's difficult to describe and might not be 100% accurate. But I realized that Python looks much better for me once and makes more sense when I try to "let Ruby go".
This is hard, because the syntax is so fucking similar sometimes. But if you're looking at it from an aerial view, the way you model things is different. I even started to like Python, even though the "baby duck syndrome" is a thing and I'm always be a Ruby guy..
Jordan Sanders
>I'm actually using Jython, and it is by no means deprecated. It is, though. They barely made it compatible to 2.7.
And those follow the same range of semantics that C unfortunately allows.
good thinking user
the functional stuff was tacked on as well, though
>not making fun of a sigil loving shell implementer hope your sister dies in her sleep tonight
Nolan Johnson
testicles
Cooper Gutierrez
>It is, though. They barely made it compatible to 2.7. They did indeed make it compatible with 2.7, though. While it's taking some time, they're still actively working on Python3 support.
Nolan Smith
If you don't already indent your code consistently, you're writing shit code. kys OP.
Isaiah Gutierrez
Even though Python's forced indentation matches what one would naturally do the majority of the time, there are times when other indentations fit better, and then Python suddenly starts sucking since it cannot support them.
I know this isn't the best example since Python has n-ary min and max functions, but it's what I had at hand. It's not too difficult to imagine similar constructions that aren't specifically min and max.
Isaiah Thompson
>latest release: 2 years ago >still working on 2.7 bugs >one branch >jython3 repository looks deserted, with the most recent update being a single fix after a year long pause
Lucas Gutierrez
>All the OO features of python feel like a tacked-on afterthought.
>one of the few languages that properly support multiple inheritance with C3 linearization >afterthought
James Rogers
>jython3 repository looks deserted, with the most recent update being a single fix after a year long pause github.com/jython/jython3/commits/master Sure it's been half a year since the last update, but they were common up to that point, and half a year isn't that bad. Not sure where you're looking.
Kevin Foster
It's not aesthetic when it's part of the syntax. Nothing uglier than making invisible characters carry syntactic weight.
Jayden Gomez
>even a clock is right twice a day on matters that shouldn't exist in the first place >marvel of engineering
They fixed that with a breaking change, btw.
Jaxon Gutierrez
>and half a year isn't that bad half a year == dead, deadest, dead-o-licious, deadarific, dust-bustin, pushin the daisies, kicking the bucket [rest_in_piss.apng]
Angel Torres
{ int i = 0 }
{bb-code} int i =0 {bb-code}
{code} int i = 0 {code}
Wyatt Garcia
How so, really? The only way to think of them as an "afterthought" is that they're not strictly part of the core language, but added on a layer above, but separating concerns like that is a good thing, not a bad thing.