Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
suffix
Jul 27, 2013

Wheeee!
our programmers suck so lets have them do manual error handling with an underpowered type system
oh and make them use lots and lots of threads

Adbot
ADBOT LOVES YOU

Shaggar
Apr 26, 2006
yeah its a stupid argument for sure. teaching someone to use the wrong tools because they're new to something is a terrible idea.

redleader
Aug 18, 2005

Engage according to operational parameters
generics are also rly easy to use imo

HappyHippo
Nov 19, 2003
Do you have an Air Miles Card?
rob pike's primary mistake is that he confuses the simplicity of implementing the language with the simplicity of using the language.

all his arguments use the later to justify the former

HappyHippo fucked around with this message at 23:02 on Nov 17, 2018

Beamed
Nov 26, 2010

Then you have a responsibility that no man has ever faced. You have your fear which could become reality, and you have Godzilla, which is reality.


all this being said, I always hear that actually writing Go is more enjoyable than its design flaws would imply. does that mean anything? who cares, Rust is fun as heck

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde

HappyHippo posted:

rob pike's primary mistake is that he confuses the simplicity of implementing the language with the simplicity of using the language.

all his arguments use the later to justify the former
The essence of all “opinionated” tech

Volte
Oct 4, 2004

woosh woosh

Beamed posted:

all this being said, I always hear that actually writing Go is more enjoyable than its design flaws would imply. does that mean anything? who cares, Rust is fun as heck
i initially had that reaction about go as well. writing go can be surprisingly liberating. you are acutely aware that the code you're writing is ugly, verbose, and repetitive, but since you can't actually do anything about it, the part of your brain that cares about that turns off. having a standard formatter also helps. it's actually kind of fun to write go, in the same way that it's fun to play those zachtronics programming games with 8 instruction CPUs. the way forward, as inelegant or verbose as it may be, is usually apparent so you can feel like you're "on a roll" a lot. it's hard not to feel seriously stymied by the lack of flexibility after awhile though. also the hubris of the creators in disregarding decades of programming language progress to double down on the mistakes of the 1970s makes it hard not to have an adversarial relationship with the language right off the bat. the only programming language creators that really come to mind off the top of my head are rob pike and guido van rossum, and in both cases it's because i've spent much time mentally screaming at them

Notorious b.s.d.
Jan 25, 2003

by Reene
gofmt is absolute genius

it is the only good idea in all of golang

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
I wonder how many people simultaneously decry IndentationError and laud gofmt

Notorious b.s.d.
Jan 25, 2003

by Reene

pokeyman posted:

I wonder how many people simultaneously decry IndentationError and laud gofmt

the stupidity of IndentationError is that the python interpreter will accept tabs or spaces and heuristically guesses which it's looking at

they didn't commit

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
it’s not ideal but I probably would’ve made the same decision. if you want people to be able to use your language without loving around with their text editor, which is entirely plausible when one of your goals is to make an easily teachable language, you probably can’t pull a make and just fail when the other whitespace is encountered

Notorious b.s.d.
Jan 25, 2003

by Reene
you already crossed that line when you designed a whitespace sensitive language

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man
regardless of the desirability of dealing with hosed up editor settings like using hard tabs it’s indefensible that the indentation heuristic is run per block so you can have a tab indented block containing a four space indented block containing a two space indented block

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
the defense is that developers overwhelmingly don't know whether they're inserting tabs or spaces and can't be made to care, in that respect rob was right

Internet Janitor
May 17, 2008

"That isn't the appropriate trash receptacle."
python's braindead approach to whitespace makes copying and pasting code from the internet very likely to completely mutilate it and require careful re-reading and re-indenting. as a way to deter novices from blindly kludging together code they haven't read, i almost like it

almost

Notorious b.s.d.
Jan 25, 2003

by Reene
ah yes making this language hard to use without enabling visual whitespace in my editor is a safety feature

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
hey janitor, yesterday was forth day. you didn't miss much

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
the guy who runs the only forth chips business in wyoming did a remote talk. they had been in debt for a while but some mystery benefactor in japan handed them enough bitcoin to put them in the black, without any formal strings, just the gentleman's agreement to make a new generation of chips. i hope the boss cashed that bitcoin on the spot, for the company's sake, but I can't be sure

Notorious b.s.d.
Jan 25, 2003

by Reene

Gazpacho posted:

the guy who runs the only forth chips business in wyoming did a remote talk. they had been in debt for a while but some mystery benefactor in japan handed them enough bitcoin to put them in the black, without any formal strings, just the gentleman's agreement to make a new generation of chips. i hope the boss cashed that bitcoin on the spot, for the company's sake, but I can't be sure

cash injections from foreign mafias are not usually the sign of a thriving industrial enterprise

champagne posting
Apr 5, 2006

YOU ARE A BRAIN
IN A BUNKER

Internet Janitor posted:

python's braindead approach to whitespace makes copying and pasting code from the internet very likely to completely mutilate it and require careful re-reading and re-indenting. as a way to deter novices from blindly kludging together code they haven't read, i almost like it

almost

it does seem like a weird way to janitor where things go as opposed to using brackets

on the other hand the decision was made way back so who knows

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
Also this guy got several local farm owners to establish a nonprofit foundation the purpose of which is to staff his company with its students so he can teach them electronics and forth programming and eventually hire them.

Notorious b.s.d.
Jan 25, 2003

by Reene
reasonable men can disagree over whether whitespace sensitivity was a good choice in python. but no sane person can defend heuristically guessing the indent level. they needed to make a single, correct, enforced-by-the-interpreter choice

i don't even care which choice it was: 2 spaces, 4 spaces, hard tabs, I give zero shits. (every time i change teams i have to twiddle a setting in my editor and then i never look at it again.)

the important part was that they needed to make a choice, and they didn't, so now it's half-baked confusing nonsense

Volte
Oct 4, 2004

woosh woosh
Guessing the indent type would be fine if it just used the first indentation it found through the whole file. I'm thankful it didn't end up like Makefiles

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
All python did was integrate the status quo ante for people who actually indent their code, and that status was “indent each block some from its surroundings” with most programmmers not caring to specify or even know what the “some” is.

When I had a horrible web app dropped on me at prev. job, one of several cleanup tasks was to replace the arbitrary mixture of tab/space indentation to just one spacing character. Then I handed off to the new overseas team who proceeded to mix it up again. Looks good in my editor, must be ok

Internet Janitor
May 17, 2008

"That isn't the appropriate trash receptacle."

Boiled Water posted:

on the other hand the decision was made way back so who knows

the explicit predecessor of python was abc, which came with a syntax-directed repl. it's a bit interesting to try out. given syntax-directed editing, it makes some sense to minimize block delimiters, and thus syntactic noise. perhaps the design decision was taken forward to python without further consideration?

one surprising aspect of abc is that there is no boolean datatype, only syntactic boolean expressions. you can define a predicate as a special case of function suitable for reference somewhere that syntactically needs a boolean, but you cannot store a boolean value in a variable:

code:
>>> PUT 4+3 IN a
>>> WRITE a
7
>>> IF 4>3: WRITE "yep"
yep
>>> HOW TO REPORT pred:
HOW TO REPORT pred:
   REPORT 4>3

>>> IF pred: WRITE "yep"
yep
>>> PUT 4>3 IN a
*** There's something I don't understand in your command
    PUT 4>3 IN a
         ^
overall it is quite a bizarre language with a remarkable number of unintuitive corners for its size.

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
btw if you think whitespace heuristics in python are bad wait til you hear what apple does with swift code

comedyblissoption
Mar 15, 2006

Notorious b.s.d. posted:

but no sane person can defend heuristically guessing the indent level. they needed to make a single, correct, enforced-by-the-interpreter choice
~worse is better~

comedyblissoption
Mar 15, 2006

we live in a world where a computer forcing someone to do the only sane and unambiguous course of action can significantly hurt your language's adoption lol

RPATDO_LAMD
Mar 22, 2013

🐘🪠🍆
we live in a world where javascript

Notorious b.s.d.
Jan 25, 2003

by Reene

RPATDO_LAMD posted:

we live in a world where javascript

a pro-tier post/av combination

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe

Gazpacho posted:

btw if you think whitespace heuristics in python are bad wait til you hear what apple does with swift code

i have never heard any actual complaints about how this works in practice, only “well if you read the spec it’s complicated”

if you have a real problem with it you can always use semicolons

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
swift has an open language/library evolution process and a lot of passionate users, so there are plenty of people participating who’ve never been part of a language effort before, or even really read a spec. there’s a certain subset of those people who are just repeatedly shocked that languages have, like, details, and because this is 2018 they like to get real mad about it on twitter

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
"the rules are too complicated to commit to memory" is a legit complaint

Internet Janitor
May 17, 2008

"That isn't the appropriate trash receptacle."
anecdotally from my own teaching experience, especially with younger kids and total beginners, it is quite difficult to get new students used to the semantic significance of whitespace. they had a somewhat easier time with languages that use explicit block delimiters. line-numbered BASIC- which notably does not feature any kind of recursive syntactic structure outside of arithmetic expressions- was by far the most intuitive syntax for these groups. students could easily form an accurate mental model of the step-by-step nature of a BASIC program. familiarity with this style of notation seemed to help later when introducing block structure by showing a correspondence to familiar patterns.

if you already know how to program in some language, picking up python's syntax and semantics aren't very hard. i am, however, quite critical of its use as an introductory language.

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe

Gazpacho posted:

"the rules are too complicated to commit to memory" is a legit complaint

the rule is “don’t put the left-paren of a call on the next line, don’t put the left-bracket of a subscript on the next line, and don’t write binary operators right next to their operands so they look like prefix/postfix operators”

no one ever does the first two so the only part you have to remember is the last

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av
swift is an extremely good language especially for beginners. it could and should replace Go

redleader
Aug 18, 2005

Engage according to operational parameters
semicolons good though

akadajet
Sep 14, 2003

hackbunny posted:

swift is an extremely good language especially for beginners. it could and should replace Go

same, but c#.

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde

redleader posted:

semicolons good though
First rule: Do not use semicolons. They are transvestite hermaphrodites representing absolutely nothing. All they do is show you’ve been to college. -- Brendan Eich, probably

Adbot
ADBOT LOVES YOU

Volte
Oct 4, 2004

woosh woosh
i've been writing nothing but swift for six months and I don't even know what the above discussion is referring to so it can't be that much of a hindrance. the piss poor error reporting is my only major complaint about it and at least I've developed a feel for intuiting what the actual problem is when I get nonsensical complaints about argument labels

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply