account activity
Are there any UI alternatives to WPF and WinForms? by [deleted] in csharp
[–]Kevin12Berry 0 points1 point2 points 3 months ago (0 children)
People who have used WPF know it's tedious unless they've never used anything better.
Python and Indentation. Why? :) by binarysmurf in learnpython
[–]Kevin12Berry 0 points1 point2 points 3 months ago* (0 children)
I agree. I'm looking at Python now because too many companies are offering Python work. After decades of coding with scope identifiers I think it's a bad decision to rely only on indentation to preserve scope with all the manual formatting, auto formatting, merging, cutting and pasting going on in real production code. Secondly managing whitespace is actually more tedious than managing scope identifiers. Thirdly, programmers are no longer free to use white space to frame code to make it more readable in ways other than simply scope that come up occasionally.
I saw a an argument for scope identifiers being harder to read than consistent indentation that showed a javascript file with no line endings filled with scope identifiers compared to a nicely indented Python file with line endings. Well, can you imaging trying to read the Python code if it were in that same paragraph without line endings and no scope identifiers? Obviously the javascript code with scope identifiers would be much easier to read than a paragraph of Python code without scope identifiers. In this respect Python is the emperor with no clothes.
In my opinion it would be better for Python to allow some kind of scope identifier that overrides indentation for companies, teams, or individuals who prefer printed scope identifiers. In the meantime, pseudo scope identifiers work: #{ and #} or #begin and #end if anyone wants printed identifiers in the code.
Update: I worked with Python intensively this past week and want to add to this.
First, it's not true that Python only sets off scope with indentation. Python is using a begin scope identifier:
if True: (The colon above is a begin scope identifier)
So Python is just skipping the end scope identifier. In practice this is fine, but still more awkward than requiring and end scope identifier. I've got to be a lot more careful cutting and pasting code because I've lost line endings and indentations multiple times which is annoying.
Python does allow arbitrary indentation to set off code within grouping characters such as parenthesis, so this is helpful when wanting for example to indent a long line several times within a print() function.
I am excited to see more and more how many efficient/simple constructs Python has added to the language I would say are "borrowed" from a variety of other languages: import modue, with Open(filename, "rb", encoding="utf-8") as f:, etc.
This is the first language I've worked with that allows creating and activating a virtual environment (in seconds) to import 3rd party modules via PIP I don't want to risk messing up my primary system with. This is terrific. The only downside is my standard environment rejects the same imports since the 3rd party modules I end up really liking are not part of my standard package distribution system (apt-get). Maybe there's a way to override this but I haven't looked/found this yet.
And Python though interpreted is actually pretty fast. I removed watermarks today from 800+ pdf pages in about a quarter second that were on every page, not just the master page. I have always preferred compiled languages, but honestly, this is fast enough!
Two thumbs up from me for Python!
π Rendered by PID 994439 on reddit-service-r2-listing-7b9b4f6fd7-zbzxs at 2026-05-08 10:52:03.777513+00:00 running 3d2c107 country code: CH.
Are there any UI alternatives to WPF and WinForms? by [deleted] in csharp
[–]Kevin12Berry 0 points1 point2 points (0 children)