Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-

What does /prog/ think about static typing

Name: Anonymous 2008-12-15 7:40

Name: Anonymous 2008-12-15 8:31

>>1
( ゚ ▽゚) <(  NO EXCEPTIONS  )

Name: Anonymous 2008-12-15 12:03

I think that's a pretty good troll.

Name: Anonymous 2008-12-15 12:11

Eh upvotes on proggit and doesn't afraid of anything.

Name: Anonymous 2008-12-15 12:17

Unless you enforce correctness, strong normalization or maybe uniqueness, don't bother. Making sure that trivial type errors never occur is fairly useless because they are easily found during testing, while it imposes quite a burden on the programmer by limiting the language. Dynamically checked contracts are much more versatile1 and, maybe most importantly, they are optional.

1 http://www.cs.brown.edu/~sk/Publications/Papers/Published/gmfk-rel-par-poly-cont/

Name: Anonymous 2008-12-15 12:44

Static typing is dumb. Even if it does prevent run-time type errors (while creating a new class of compile-time type errors we can make), it does nothing to prevent invalid values, which are arguably the more common and problematic issue.

Name: Anonymous 2008-12-15 12:49

Vote up if you think reddit sucks

Name: Flea Turd Operator 2008-12-15 13:11

I vcant' find the vote button. how do i register m y account on the 4chan ?

Name: Anonymous 2008-12-15 13:13

Dynamic typing sucks in imperative languages. The only place it is useful is functional languages. The end.

Name: Anonymous 2008-12-15 13:27

>>9

1/10

Name: Anonymous 2008-12-15 14:12

The only static typing system that doesn't suck is Haskell's.

Name: Anonymous 2008-12-15 14:47

>>11
Then I think you need to look at Qi.

Name: Anonymous 2008-12-15 14:52

In OO languages static typing provides way better performance than dynamic typing, and won't go away any time soon solely for that reason. All other arguments are bullshit.

In procedural languages static typing is usually shitty and gets in the way more than it helps. The reason there's no standard container library in C is that you'd have to typecast shit all the time like you did in java (but without the run-time checking), effectively rendering the type system useless. Typeless languages like Forth are clearly superior for "medium-level" programmimg.

In functional languages, I don't know if static typing in general is the way to go, but I do know that Haskell's type system allows you to do some very neat tricks while pretty much ensuring your will run correctly (with no unforeseen errors, that is).

Name: >>13 2008-12-15 14:54

*your program will run correctly

Name: >>14 2008-12-15 15:14

*you're program will run correctly

Name: Simon Peyote Joints 2008-12-15 16:05

Haskell is great. It fucking checks my type errors and I instantly know that if it passes the type checker, then my program will be bug-free. I can't wait for dons to add halt-detection support to GHC so I can tell which of my programs halt and which don't.

Name: Anonymous 2008-12-15 16:50

>>13
In OO languages static typing provides way better performance than dynamic typing
0/10

Name: Anonymous 2008-12-15 18:41

>>17
-1/10

Name: Anonymous 2008-12-15 19:07

>>18
Please apply troll ratings only to trolls. Thank you.

Name: Anonymous 2008-12-15 23:57

>>19
Troll ratings are trolls are troll ratings.

Name: Anonymous 2008-12-16 11:37

>>16
s/dons/ndm/

Name: Anonymous 2008-12-16 11:44

>>19
If it walks like a troll and quacks like a troll, I would call it a troll.

Name: Anonymous 2008-12-16 12:19

>>22
Guido

Name: Anonymous 2008-12-16 12:22

I like static typing and BDSM.

Name: Anonymous 2008-12-16 17:02

>>17
Don't believe it? Take a stroll through the shootout and find out for yourself, mate: http://shootout.alioth.debian.org

Name: Anonymous 2008-12-16 17:07

>>25
And you think that has something to do with the type system? Way to eliminate variables, faggot.

Name: Anonymous 2008-12-16 17:32

Of course it has something to do with the type system, you fucking moron. Dynamic dispatch through virtual table, which can only be done through static typing, is inherently faster than the fucking multiple hashtable lookup that is done in dynamicaly typed languages. Also, static typing allows for primitive types, and even a goddamn retard like yourself must know that a fucking primitive int type will always be fastes than an Integer object. Shut the fuck up, you fucking cunt.

Name: Anonymous 2008-12-16 17:43

>>27
It's like you think dynamic typing means no type inference and method inlining on the compiler's part is allowed.

Name: Anonymous 2008-12-16 17:47

I like fuck you fucking reddit readers

Name: Anonymous 2008-12-16 19:09

>>28
Nor runtime profiling and JIT with decision caching.

Name: Anonymous 2008-12-17 4:01

>>29 What's wrong with reddit? It's a good source of information.

Name: Anonymous 2008-12-17 5:22

>>28,30
The only dynamically typed language where type inference works well is Lisp (and Dylan, because it's Lisp), and only when you're sticking to the non-OO stuff. Runtime profiling, JIT compiling and method caching are done in every "high performance" virtual machine for dynamically typed OO languages (mostly Smalltalk VMs), and their performance are still crap when compared to, say, Java. You fucks want to believe in magic? Fine. Just don't fucking expect to use magic as an argument.

Name: Anonymous 2008-12-17 5:23

>>31 What's wrong with /b/? It's a good source of information.

Name: Anonymous 2008-12-17 5:47

>>32
The only dynamically typed language where type inference works well is Lisp
What.

Name: Anonymous 2008-12-17 5:52

>>27
a fucking primitive int type will always be fastes than an Integer object
[citation needed]

Name: Anonymous 2008-12-17 6:14

>>35
You sure you don't want to [Citation Needed]
static typing allows for primitive types
? As if you must have a static language to unbox values in the compiler. Everybody does this, because it's fucking obvious.

Name: Anonymous 2008-12-17 6:38

This is turning out to be more successful than I ever imagined.

Name: Anonymous 2008-12-17 6:46

'-._,,,,.._______________.....___
                                 `-,
                                    `._    
                                       (
                                        \   HAVE YOU IMPLEMENTED AN OBJECT SYSTEM TODAY?
                                        \
`-_                                     '
   `-..............._                  ,
                     `-.._         _.-'
                          `'-----''

Name: Anonymous 2008-12-17 7:08

>>34
Part of the reason SBCL is so fast is type inference.

>>36
Unboxing values in the compiler is much less effective than already having them unboxed everywhere.

Name: Anonymous 2008-12-17 9:36

>>39
Unboxing values in the compiler is much less effective than already having them unboxed everywhere.
Effective in what sense? That's only true if you think compile time is a relevant metric for anything.

Name: Anonymous 2008-12-17 14:27

Both static typing and dynamic typing have their places. Dynamic typing is good if you want to "get shit done"--that's why "scripting languages" such as Python and Ruby use it. For larger projects, however, ensuring that types match can be important, and it can be helpful for the compiler to catch potential run-time errors at compile-time; Haskell does this brilliantly, and even though GHC's error messages can be hard to comprehend, they help you ensure that your program's types are logical.

Name: Anonymous 2008-12-17 14:46

Try telling this to generics in Java. During complication the type is erased and everything is treated as Object and then constantly boxed and unboxed in each scope you access them in.

Name: Anonymous 2008-12-17 15:14

>>42
During complication the type is erased and
complication the type
complication

Name: Anonymous 2008-12-17 15:41

>>43
BBCODE EXPERT

Name: Anonymous 2008-12-17 15:49

>>42
Also the "erasure" process is confusing as hell. I don't know if it's possible to fuck up generics any worse than C++, but Java has definitely put in a good effort.

Name: Anonymous 2008-12-17 16:00

>>45
How are "generics" (I think you mean "templates") fucked-up in C++, other than taking a while to instantiate? The view of each instantiation of a template as a separate class makes sense to me.

Name: Anonymous 2008-12-17 17:32

>>40
Less effective in the sense that the compiler doesn't always know when something is a value and can be unboxed.

Name: Anonymous 2008-12-17 20:06

Name: Anonymous 2010-12-10 7:02

Name: Anonymous 2011-02-03 0:04

Don't change these.
Name: Email:
Entire Thread Thread List