|
Always be wary of scripting languages.
|
|
|
|
|
Some are worse than others. Tcl is far worse than Python.
This is not an objection to your statement. Quite to the contrary. Scripting languages are bad.
|
|
|
|
|
I generally am. I haven't found one I like yet.
Real programmers use butterflies
|
|
|
|
|
honey the codewitch wrote: Pass seems like it should never exist in any language.
; The equivalent of Python's pass in C, C++, and C#. Most useful as a loop body when the loop construct does all of the work.
Software Zen: delete this;
|
|
|
|
|
ah, fair enough. Gosh, I don't like the look of it though.
Real programmers use butterflies
|
|
|
|
|
I always feel dirty when there's the need to do that. I usually just unravel the loop construct so there's a loop body.
cheers
Chris Maunder
|
|
|
|
|
Same here. I have an inherent distrust of while loops with more than 3 or so condition expressions, and I despise for loops with termination conditions that are unrelated to the iteration.
Software Zen: delete this;
|
|
|
|
|
The Python seems more readable that the statement with a ternary expression. I have just started learning python, but the `if/else` is very clear to me.
"'Do what thou wilt...' is to bid Stars to shine, Vines to bear grapes, Water to seek its level; man is the only being in Nature that has striven to set himself at odds with himself."
—Aleister Crowley
|
|
|
|
|
The different order of notation doesn't seem that worthy of a WTF. That's just a bit getting used to, nothing more.
The real WTFs with Python I've seen are negative notation for hexadecimal numbers instead of two's complement and the inability to find the entry point in anything remotely complex because Python doesn't have a main method, it's just a script language evaluating from the top. Doesn't help when debugging control flow.
|
|
|
|
|
HA HA HA.... Excellent.
COBOL 2 point O
What goes around, comes around.
|
|
|
|
|
Peter Shaw wrote: COBOL 2 point O One of my claims to fame is that I've successfully avoided learning COBOL, even though a couple of my positions had me skidding really close to it.
I seem to remember one of the [dis]honorable mentions in the Obfuscated C/C++ Contest was a header file that let you write 'C' in a form closely resembling COBOL. As I recall, it was voted "Worst Abuse of the Preprocessor" that year.
Software Zen: delete this;
|
|
|
|
|
Unfortunately it was pushed upon me with great vigor during my University Years. One of my programming teachers was an ex British Telecom COBOL programmer (Where talking 1994 ish here) and she was absolutely rabid about the virtues of the language.
She used to fail assignments for stupid things like putting 2 spaces in a comment line where there should only have been one, she treat code layout and formatting like it was a fashion statement and refused to even mention the names of any other languages.
Thankfully, the "digital electronics" parts of my studies covered C/C++ and my accountancy part had some Pascal parts... so that stopped me from going insane
|
|
|
|
|
honey the codewitch wrote: and then there's pass.
Pass seems like it should never exist in any language.
And the rest is a Fail.
|
|
|
|
|
As someone who taught a few CS courses...
for a NEW programmer, the Python Syntax makes MORE sense than the C style syntax.
x = 3 if I_Need_A_Small_Number else 3333
which is even cleaner in error checking:
addError("You can't have this") if X = 0
addError("You can't have this") if Y = 0
...
showErrors()
This was a feature of DEC Basic-Plus 2 (I called it an outside if) and in a world where something had to be tweaked in a block of code, and you did not want to affect program flow... Wow, it was a gift.
The C syntax is best explained as a "fake function" IIF() => X = IIF(cond, true_val, false_val);
but invariably the kids ask the correct question: Wouldn't that be BETTER/CLEARER syntax? (And I would explain that is why we have a PRE-PROCESSOR, LOL).
And again, I LOVE the PL/SQL DECODE() statement, which is "?:" on Steroids:
X = Decode(v0, V1, R1, V2, R2, V3, R3, R4) -> Where R4 (the extra param is the ELSE condition)
It is literally a CASE statement in function form!
That said. Python has ONE THING I absolutely hate. THE WHITESPACE inequity. I wish they treated a single tab as 2 spaces. Life would be simply. My editors convert Tabs to spaces. But ONLY when I edit a line. OMFG this might be bad in Python. LOL.
|
|
|
|
|
significant whitespace in a programming language is just a terrible idea
Real programmers use butterflies
|
|
|
|
|
I don't get the hate on python. It's a typical 1980s language. It is what it is because it's a product of the time it was invented in. You can't apply today's values to a language whose syntax was designed almost 40 years ago and expect it to hold up. Yeah, I know C was around back then, and is the dominant syntax today, but back then, C didn't have much penetration and Fortran was king. Python is kind of an ugly stepchild of Fortran, and shows it.
|
|
|
|
|
patbob wrote: Python is kind of an ugly stepchild of Fortran
The explains a lot. Honestly, I didn't know Python was that old.
However, significant whitespace there's really no excuse for in any language, as the problems with it - both lexing it and using it - were pretty well known by the 1980s, AFAIK.
That's why i'll never adopt it. Half my editors won't even work with it very well. (tabs to spaces can easily kill a python program)
Real programmers use butterflies
|
|
|
|
|
Fortran didn't require any whitespace. If you were parsing
DO2I=1
you might have an assignment statement or, if the next symbol was a comma, a DO loop.
How about
DO2INUMBR(JPARM1,KPARM2,LPARM3)=LRESLT(MINDEX,INDEX2,INDEX3)
You still don't yet know if it's a DO loop or an assignment!
|
|
|
|
|
*cries*
Real programmers use butterflies
|
|
|
|
|
AWK was invented in the 70s. Its basic structure has been around from the beginning, and it is as elegant today as it was back in the day.
Need to process a text file in some way? Use AWK (GAWK) to do it and you can spend your time thinking about what it is you want to do with the file's contents.
You need to spend no time thinking about or writing code to open the file, read its contents, or break it into meaningful tokens--AWK does it all for you.
FormerBIOSGuy
|
|
|
|
|
1 GB.
I apologize if crossposted/reposted/"Re:fwd:fwd:Re:fwd"/etc...
|
|
|
|
|
The Lounge[^]
after many otherwise intelligent sounding suggestions that achieved nothing the nice folks at Technet said the only solution was to low level format my hard disk then reinstall my signature. Sadly, this still didn't fix the issue!
|
|
|
|
|
Yes, but mine was better.
|
|
|
|
|
Actually it will be 1 UK, which is not a measure of size unfortunately.
|
|
|
|
|
Typical English attitude. "One football field" is a unit of size; "The size of Wales" also. But never "1 UK" ...
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|