They each have their place and use. I can't imagine a dynamically typed 45k loc project, it would be unmanageable, while a simple piece of JavaScript that you spend 15 minutes on would be a waste to make typed.
I just like the fact this image seems to shit on them both equally, as a critique of the absolutism some people have. I found it in a slide deck from a talk given by the author of Lua.
It's all about the load curve. Static typing is heavily front loaded, dynamic rear loaded.
Also, a complete retard would have a problem destroying a staticly typed system, whereas they could easily introduce chaos in a dynamic code base with one check in.
Anyone seriously deving in dynamic languages is probably using a strict pre-processor anyways. At least I'd hope so.
Agreed. A program by definition has dynamic elements. Static typing can be taken to extremes (e.g. having a different type for differently-ranged integers, e.g. one from 1 to 10 versus 1 to 100). If a program is written where you never know the types of objects, there will be persistent combinations of events at run-time that trigger errors, and the compiler can't do any checking.
I disagree. Anything more than a 1-liner benefits from static types. Untyped code should be static generic. Type inference can make this as convenient to write as dynamic types.
(For anyone reading, feel free to correct me or add more to it)
Programming languages are either Static Type or Dynamic Type.
Static Type means to declare the data type of the variable that you want to define. Example:
int a = 5;
string b = "Hello World";
bool c = true;
In the above, the data types are int, string, and bool.
In Dynamic Type programming languages, you do not declare the data type. Instead, the programming can deduce what type of data it is by what you put in. Example:
a = 5;
b = "Hello World";
c = true;
Pros and Cons:
Dynamic Type is generally easier for beginners, is faster to write code, and the compiler is less likely to give errors when you attempt to run the program. However, you still have to be careful as you might not get the result you were expecting.
Static Type forces you to cross your "i"s and dot your "t"s. The compiler will give you errors if what you're trying to define doesn't match with the data type you declared. However, it's a bit slower to write code.
And for the meme: the Dynamic Type guy finishes faster but gets unexpected results, while the Static Type guy is really far behind.
Static typing does not mean you must declare the type, types can be inferred in many statically typed languages. It only means the type of a variable can not change.
I’ll tell you this, all these static typing people are a bunch of nerdy faggots that can’t handle dynamism, are scared of eval(), have never used a lisp, and think that JavaScript is somehow a good example of a dynamic interpreted language.
Goddamned children. If I want a “static type” I’ll use a fucking class for it and have done with.
Here's how you can fill up your bank account with additional cash each week... Read more by visiting this site open and go home page or home profit system........................ www.help54.com
56 comments
0 u/PuttItOut 22 Jul 2019 22:21
Dynamic typers: Let's let the end users find the problems.
Static typers: I'd rather have the compiler take a look first.
0 u/Wowbagger 22 Jul 2019 23:20
I fucking love you.
0 u/Plavonica 22 Jul 2019 23:57
Dynamic typers: learning the debug tool is too hard.
0 u/PuttItOut 23 Jul 2019 00:29
Soooo true... I am blown away when I see "programmers" that don't know the bare essentials concerning debugging.
"Set a break point? What's that?" -Senior "Engineer"
0 u/waucka 23 Jul 2019 02:44
No kidding. There's nothing hard about
printf()!0 u/RevanProdigalKnight 23 Jul 2019 04:18
I tried to learn to use
gdb. I failed.Thankfully, there are other debuggers available for C and C++ that I have learned.
0 u/privacy_first 23 Jul 2019 05:16
Find a good mentor
you are not supposed to use gdb directly, normally it is used by the IDE to present you with a simpler view of what is happening.
0 u/RevanProdigalKnight 23 Jul 2019 12:09
I was trying to learn it for a class where we were forbidden from using an IDE. I ended up resorting to poor man's debugging instead.
0 u/ScionOfZion 23 Jul 2019 20:20
Call it logging. Rich men call it logging.
0 u/glassuser 23 Jul 2019 00:11
Loose typers: can't we all just be friends?
0 u/go1dfish 23 Jul 2019 01:25
TypeScript says why not both?
0 u/PuttItOut 23 Jul 2019 01:40
No one is supposed to know what I'm actually talking about!
0 u/memememema 23 Jul 2019 05:56
we will all learn the truth..one way or another...muwahahahaha
0 u/go1dfish 23 Jul 2019 07:32
If this is an indication you are using TypeScript for upcoming Voat stuff I highly recommend it.
I've transitioned most all of my code over to typescript (not yet the ui yet though)
https://github.com/notabugio/notabug-peer/tree/master/src
VS Code is pretty nice too; I do feel a bit dirty using MS software again though.
0 u/AlexanderMorose13 23 Jul 2019 05:31
As usual, you got to the correct words before I did.
0 u/Splooge 23 Jul 2019 05:38
hi putt
1 u/moonlooker 23 Jul 2019 11:28
Right. Shortcuts often don't solve problems, they only make them more difficult to understand.
0 u/ggolemg 22 Jul 2019 22:23
They each have their place and use. I can't imagine a dynamically typed 45k loc project, it would be unmanageable, while a simple piece of JavaScript that you spend 15 minutes on would be a waste to make typed.
0 u/HoneyTrap1488 [OP] 22 Jul 2019 22:36
I just like the fact this image seems to shit on them both equally, as a critique of the absolutism some people have. I found it in a slide deck from a talk given by the author of Lua.
0 u/PuttItOut 22 Jul 2019 23:33
It's all about the load curve. Static typing is heavily front loaded, dynamic rear loaded.
Also, a complete retard would have a problem destroying a staticly typed system, whereas they could easily introduce chaos in a dynamic code base with one check in.
Anyone seriously deving in dynamic languages is probably using a strict pre-processor anyways. At least I'd hope so.
0 u/prairie 23 Jul 2019 02:30
Agreed. A program by definition has dynamic elements. Static typing can be taken to extremes (e.g. having a different type for differently-ranged integers, e.g. one from 1 to 10 versus 1 to 100). If a program is written where you never know the types of objects, there will be persistent combinations of events at run-time that trigger errors, and the compiler can't do any checking.
0 u/ScionOfZion 23 Jul 2019 20:30
I disagree. Anything more than a 1-liner benefits from static types. Untyped code should be static generic. Type inference can make this as convenient to write as dynamic types.
0 u/Gumbatron 22 Jul 2019 22:41
I probably would have used a picture of a duck rather than a giraffe, but it's worth a chuckle anyhow.
0 u/HoneyTrap1488 [OP] 22 Jul 2019 22:47
If it looks like a tail and acts like a tail -- it must be a tree.
0 u/Fambida 22 Jul 2019 23:04
That's the most painfully correct comic I've seen in a while.
0 u/EEMac 23 Jul 2019 00:03
This is painfully true. I've seen it and lived it from both sides of the picture.
0 u/Drenki 23 Jul 2019 00:10
oh good, let's have a flame war :-D
0 u/fluhthreeex 23 Jul 2019 00:35
ha ha pageet not in picture because he finish his pizzle furst ah ha ha!
0 u/Pubiclouse 23 Jul 2019 00:38
I wish I knew enough about any of this to comment.
0 u/user9713 23 Jul 2019 03:22
Explained here: https://voat.co/v/programming/3347536/19860217
0 u/phillyjoe 23 Jul 2019 01:03
And then there is the void pointer, and the magic therein.
0 u/sam_m1980 23 Jul 2019 02:04
Awesome !!!
0 u/Garglemysac 23 Jul 2019 02:28
I have no idea what this is pertaining to but the lack of niggerjew comments is concerning.
0 u/user9713 23 Jul 2019 03:14
(For anyone reading, feel free to correct me or add more to it)
Programming languages are either Static Type or Dynamic Type.
Static Type means to declare the data type of the variable that you want to define. Example:
In the above, the data types are int, string, and bool.
In Dynamic Type programming languages, you do not declare the data type. Instead, the programming can deduce what type of data it is by what you put in. Example:
Pros and Cons:
And for the meme: the Dynamic Type guy finishes faster but gets unexpected results, while the Static Type guy is really far behind.
0 u/Garglemysac 23 Jul 2019 03:36
So basically the difference between nigger pool and calling all your shots beforehand like a respectable whiteman.
0 u/user9713 23 Jul 2019 03:41
LMAO great analogy!
0 u/no-hurry-no-pause 23 Jul 2019 16:54
No, it isnt.
Calling your shots beforehand when you do not have to call your shots beforehand is a waste of effort and thus stupid.
0 u/HoneyTrap1488 [OP] 23 Jul 2019 05:50
Dynamic languages are for niggers? wtf, I hate dynamic languages now...
1 u/HandsomeOmega 23 Jul 2019 17:22
Static typing does not mean you must declare the type, types can be inferred in many statically typed languages. It only means the type of a variable can not change.
0 u/user9713 23 Jul 2019 17:32
Thanks!
0 u/HoneyTrap1488 [OP] 25 Jul 2019 06:06
I would have used the example:
0 u/Fagtardicus 23 Jul 2019 07:19
NIGGERKIKEFAGGOT
0 u/jackfraser 23 Jul 2019 14:27
I’ll tell you this, all these static typing people are a bunch of nerdy faggots that can’t handle dynamism, are scared of eval(), have never used a lisp, and think that JavaScript is somehow a good example of a dynamic interpreted language.
Goddamned children. If I want a “static type” I’ll use a fucking class for it and have done with.
0 u/libman 24 Jul 2019 03:52
Niggas be like:
def BuyKfc (DwumStickz, Wingz): ...And then the Jew hired to clean up after the Affirmative Action hires be like:
`` typedef unsigned int t_kfc_drumstick; typedef unsigned int t_kfc_wings;
bool purchase_kentucky_fried_chicken (t_kfc_drumstick drumstick_qty, t_kfc_wings wings_qty) { ... } ``
0 u/bbqchipz 23 Jul 2019 03:54
JESUS FUCKING CHRIST! THIS IS WHY TECHNOLOGY IS FUCKING SHIT NOW. We didn't have that shit when I learned to code.
0 u/Red_Menace 23 Jul 2019 04:43
Fuck I hate Python. It's just so fucking annoying tracing passed datatypes IF YOU CANT FUCKING READ THEM.
0 u/generate 23 Jul 2019 08:48
So Python is like JS? I never tried, I don't like the crowd, they are all poor and depressed, why is that?
0 u/libman 24 Jul 2019 04:06
Use Nim - Pythonic syntax with types at the speed of C.
0 u/Lare1956 23 Jul 2019 04:52
Here's how you can fill up your bank account with additional cash each week... Read more by visiting this site open and go home page or home profit system........................ www.help54.com
0 u/generate 23 Jul 2019 08:44
but somehow Node conquered the globe
0 u/HoneyTrap1488 [OP] 23 Jul 2019 08:51
Node conquered the attention of soyboy programmers....but not much else.
0 u/generate 23 Jul 2019 09:21
So you are saying React, Angular Vue using nmp is just a passing fad, yep
0 u/tazadi 23 Jul 2019 11:32
What if it is not dynamic or not static?
0 u/7e62ce85 23 Jul 2019 12:16
... and we forsake the JavaScript and all its works, amen.
0 u/DestroyerOfSaturn 23 Jul 2019 18:14
Bunch of glow in the dark.
0 u/20218338 17 Aug 2019 23:36
variables don't have types, values have; if you understood, we can start talking