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
Mr. Glass
May 1, 2009

Arcsech posted:

this but everything

Adbot
ADBOT LOVES YOU

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

even i know that this is terrible

Mr. Glass
May 1, 2009
i agree with this paper inasmuch as i think methodology is basically irrelevant for stupid throwaway projects, which is literally the only conclusion that can be drawn from it

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord

MALE SHOEGAZE posted:

even i know that this is terrible

sure it's not a definitive study that kills the issue but I still think it has a few interesting points :shrug:

like most people saying itt that static typing is obviously a great cognitive handhold, if that was absolutely true maybe that'd be immediately apparent in the study?!??!?!??!?!?!?!

Symbolic Butt fucked around with this message at 04:18 on Apr 12, 2015

comedyblissoption
Mar 15, 2006

dijkstra posted:

I am faced with a basic problem of presentation. What I am really concerned
about is the composition of large programs, the text of which may be, say, of the
same size as the whole text of this booklet. Also I have to include examples to
illustrate the various techniques. For practical reasons, the demonstration
programs must be small, many times smaller than the "life-size programs" I have in
mind. My basic problem is that precisely this difference in scale is one of the
major sources of our difficulties in programming!

It would be very nice if I could illustrate the various techniques with
small demonstration programs and could conclude with " ... and when faced with a
program a thousand times as large, you compose it in the same way. This common
educational device, however, would be self-defeating as one of my central themes
will be that any two things that differ in some respect by a factor of already a
hundred or more, are utterly incomparable.

History has shown that this truth is very hard to believe. Apparently we are
too much trained to disregard differences in scale, to treat them as "gradual
differences that are not essential". We tell ourselves that what we can do once,
we can also do twice and by induction we fool ourselves into believing that we can
do it as many times as needed, but this is just not true! A factor of a thousand
is already far beyond our powers of imagination!

Let me give you two examples to rub this in. A one-year old child will crawl
on all fours with a speed of, say, one mile per hour. But a speed of a thousand
miles per hour is that of a supersonic jet. Considered as objects with moving
ability the child and the jet are incomparable, for whatever one can do the other
cannot and vice versa. Also: one can close one's eyes and imagine how it feels to
be standing in an open place, a prairie or a sea shore, while far away a big,
reinless horse is approaching at a gallop, one can "see" it approaching and passing.
To do the same with a phalanx of a thousand of these big beasts is mentally impossible: your heart would miss a number of beats by pure panic, if you could!
http://www.cs.utexas.edu/users/EWD/ewd02xx/EWD249.PDF

Maluco Marinero
Jan 18, 2001

Damn that's a
fine elephant.
One developer? 27 hours over 4 working days? No maintenance coding or extension?

Why would you expect static typing to produce a tangible benefit in this scenario. The single developer wrote everything themselves, and did so without having to accommodate changes in specification half way through development.

This is absolutely best possible scenario for not needing static typing, ESPECIALLY the fact that the outcome was set from the get go.

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Symbolic Butt posted:

sure it's not a definitive study that kills the issue but I still think it has a few interesting points :shrug:

like most people saying itt that static typing is obviously a great cognitive handhold, if that was absolutely true maybe that'd be immediately apparent in the study?!??!?!??!?!?!?!

i dont buy that it is a great cognitive handhold -- assuming what you mean is that it helps with the design and implementation of programs. it does not. but it's absolutely critical in dealing with large, old, multi-developer codebases.

Tiny Bug Child
Sep 11, 2004

Avoid Symmetry, Allow Complexity, Introduce Terror
In none of these measured points the use of a static type system turned out to have a successful impact. In the first case, the use of a statically typed programming language had a significant negative impact, in the latter one, no significant difference could be measured.

DAAAAAMMMNNNNN

Tiny Bug Child
Sep 11, 2004

Avoid Symmetry, Allow Complexity, Introduce Terror

Maluco Marinero posted:

One developer? 27 hours over 4 working days? No maintenance coding or extension?

wtf are you talking about there were 49 developers

Tiny Bug Child
Sep 11, 2004

Avoid Symmetry, Allow Complexity, Introduce Terror
anyway sure maybe it's not a perfect study but given that i have literally seen zero evidence of any benefit to static typing, ever, i feel like the ball is pretty solidly in sperg-typing court now

brap
Aug 23, 2004

Grimey Drawer
49 teams of one you loving idiot

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

VikingofRock posted:

I didn't mean to imply that good langs shouldn't be used for short scripts. I actually started semi-seriously learning haskell after I saw someone in this thread post some of their haskell CJ scripts.

i do my scripting in haskell. it owns

Maluco Marinero
Jan 18, 2001

Damn that's a
fine elephant.

fleshweasel posted:

49 teams of one you loving idiot

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope
keep going, i'm sure that this time you'll convince tbc

Tiny Bug Child
Sep 11, 2004

Avoid Symmetry, Allow Complexity, Introduce Terror

fleshweasel posted:

49 teams of one you loving idiot

oh ok i guess that means we should just ignore this and focus on all of the hard evidence for the superiority of static typing, like

Kathleen
Feb 26, 2013

Grimey Drawer
i find the hand-holding of a good type system is really helpful even when i'm the only one working on a code base. recently i had to make a small-to-medium scale scientific application in python and it was hell.

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

focal ischemia posted:

i find the hand-holding of a good type system is really helpful even when i'm the only one working on a code base. recently i had to make a small-to-medium scale scientific application in python and it was hell.

mega agreedo

karms
Jan 22, 2006

by Nyc_Tattoo
Yam Slacker
I'm wondering whether people's preferences about static typing because that's what one knows the best and how someone has learned to reason about programs. Like how a programmer that grew up with smalltalk can't stop thinking about sending messages to objects whenever possible.

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

i basically learned programming with python. i had used java and basic and stuff before, but everything really started clicking for me with python. i used it almost exclusively for about 7 or 8 years, until i learned haskell and now i can barely stand python. a lot of that is because i grew to really see the benefits of haskell's type system

Workaday Wizard
Oct 23, 2009

by Pragmatica
i love static type systems where you don't have to write the types of local variables

i wish Java proper get it someday

MononcQc
May 29, 2007

Y'all should read How Do Types Affect Productivity and Correctness? which evaluates a bunch of papers on statics vs. dynamic typing and figures out:

quote:

Of the controlled experiments, only three show an effect large enough to have any practical significance. The Prechelt study comparing C, C++, Java, Perl, Python, Rexx, and Tcl; the Endrikat study comparing Java and Dart; and Cooley’s experiment with VHDL and Verilog. Unfortunately, they all have issues that make it hard to draw a really strong conclusion.

In the Prechelt study, the populations were different between dynamic and typed languages, and the conditions for the tasks were also different. [...] A follow-up to the follow-up literally involves comparing code from Peter Norvig to code from random college students.

In the Endrikat study, they specifically picked a task where they thought static typing would make a difference, and they drew their subjects from a population where everyone had taken classes using the statically typed language. They don’t comment on whether or not students had experience in the dynamically typed language, but it seems safe to assume that most or all had less experience in the dynamically typed language.

Cooley’s experiment was one of the few that drew people from a non-student population, which is great. But, as with all of the other experiments, the task was a trivial toy task. While it seems damning that none of the VHDL (static language) participants were able to complete the task on time, it is extremely unusual to want to finish a hardware design in 1.5 hours anywhere outside of a school project. You might argue that a large task can be broken down into many smaller tasks, but a plausible counterargument is that there are fixed costs using VHDL that can be amortized across many tasks.

As for the rest of the experiments, the main takeaway I have from them is that, under the specific set of circumstances described in the studies, any effect, if it exists at all, is small. [...] Moving on to the case studies, the two bug finding case studies make for interesting reading, but they don’t really make a case for or against types.

[...]

And then there are the studies that mine data from existing projects. Unfortunately, I couldn’t find anybody who did anything to determine causation (e.g., find an appropriate instrumental variable), so they just measure correlations. Some of the correlations are unexpected, but there isn’t enough information to determine why.

[...]

Some notable omissions from the studies are comprehensive studies using experienced programmers, let alone studies that have large populations of “good” or “bad” programmers, looking at anything approaching a significant project.

Soricidus
Oct 21, 2010
freedom-hating statist shill

MononcQc posted:

Y'all should read How Do Types Affect Productivity and Correctness? which evaluates a bunch of papers on statics vs. dynamic typing and figures out:

please keep your science out of my religion tyvm

Notorious b.s.d.
Jan 25, 2003

by Reene
you can post studies and metastudies about students inverting matricies in perl all you want. i've spent years of my life writing perl and ruby and i will never get those years back

of my own volition, i will never choose to do a project in a "scripting language" ever again.

give me static typechecking or give me death

ok just give me death

bobbilljim
May 29, 2013

this christmas feels like the very first christmas to me
:shittydog::shittydog::shittydog:
leave dynamic types to the "Rockstar" devs imho

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope
actually, science and facts support that my favorite language is objectively the best and your favorite language is a piece of poo poo.

why would i, a rational actor, willingly use a bad language?

Notorious b.s.d.
Jan 25, 2003

by Reene
two can play this dumb game

Soricidus
Oct 21, 2010
freedom-hating statist shill

Notorious b.s.d. posted:

two can play this dumb game



needs some overlap between the proponents

like in my experience dynamic typing is good for prototyping and for small solo projects that are unlikely to require long-term maintenance, while static typing is useful when working on larger projects, stuff that's going to need long-term maintenance, and stuff that's going to be worked on or used by many people

currently I use Python for the former and Java for the latter and they're both good within their limits

e: every time this comes up I start thinking that really what I want is optional typing, is that mainstream yet

triple sulk
Sep 17, 2014



Soricidus posted:

e: every time this comes up I start thinking that really what I want is optional typing, is that mainstream yet

use scala i guess

raminasi
Jan 25, 2005

a last drink with no ice

focal ischemia posted:

i find the hand-holding of a good type system is really helpful even when i'm the only one working on a code base. recently i had to make a small-to-medium scale scientific application in python and it was hell.

yeah there's never just one developer. "yourself, four hours ago" is a second developer.

Notorious b.s.d.
Jan 25, 2003

by Reene

Soricidus posted:

e: every time this comes up I start thinking that really what I want is optional typing, is that mainstream yet

optional typing devolves to no typing, because programmers are assholes

scala and groovy let you have your static type system on the jvm without spending time typing out boilerplate. flexible like a scripting language, typechecked like java

Notorious b.s.d.
Jan 25, 2003

by Reene
i like scala a little better than groovy but who gives a poo poo

just give me a repl and static type checking in the same language, i'm happy

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS
i just want a repl for c#

Workaday Wizard
Oct 23, 2009

by Pragmatica

Soricidus posted:

e: every time this comes up I start thinking that really what I want is optional typing, is that mainstream yet

this is why i was playing with kotlin

saying val todolist = ArrayList<Butt>() is much better than ArrayList<Butt> todolist = new ArrayList<Butt>()

Notorious b.s.d.
Jan 25, 2003

by Reene

Blinkz0rz posted:

i just want a repl for c#

third-party repls exist for c#, and even for java. but i want more. i want a repl to be core to the language, every language

i want everyone all the time to be using their programming languages interactively. i want to run c# code as a script and deploy it with no dependencies

Notorious b.s.d.
Jan 25, 2003

by Reene

Shinku ABOOKEN posted:

this is why i was playing with kotlin

saying val todolist = ArrayList<Butt>() is much better than ArrayList<Butt> todolist = new ArrayList<Butt>()

i haven't tried kotlin yet but it looks like it would also fit my criteria

i had scala and groovy forced on me by job requirements

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS

Notorious b.s.d. posted:

third-party repls exist for c#, and even for java. but i want more. i want a repl to be core to the language, every language

i want everyone all the time to be using their programming languages interactively. i want to run c# code as a script and deploy it with no dependencies

ya that's what i mean. people who enjoy plangs like them because they can pop open a text editor write some code then run it

Notorious b.s.d.
Jan 25, 2003

by Reene

Blinkz0rz posted:

ya that's what i mean. people who enjoy plangs like them because they can pop open a text editor write some code then run it

and that is a 100% reasonable thing to demand from a programming language

but don't stop there

we can have typechecking and soundness and correctness AND interactivity

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS

Notorious b.s.d. posted:

and that is a 100% reasonable thing to demand from a programming language

but don't stop there

we can have typechecking and soundness and correctness AND interactivity

i want it

Mr. Glass
May 1, 2009

what if i told you this language already exists

Adbot
ADBOT LOVES YOU

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Notorious b.s.d. posted:

we can have typechecking and soundness and correctness AND interactivity

if you write Hack in checked mode, you get a lot of that

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