[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
How old were you when you realized dynamic typing is idiotic?
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 33
Thread images: 2
File: 1458452710458.png (59 KB, 884x131) Image search: [Google]
1458452710458.png
59 KB, 884x131
How old were you when you realized dynamic typing is idiotic? I was 12.
>>
>>54531833
dynamic typing running wild is idiotic

dynamic typing kept under control by actually knowing what each function accepts/returns is like being able to make up interfaces out of thin air and slapping them onto any object that happens to comply with it already, giving you the safety of typing with the flexibility of being able to do whatever the fuck you want

>muh js is shit maymay
then maybe learn how to use it well first
>>
Happy birthday
>>
the first time I used javascript
>>
>>54533319
>dynamic typing kept under control by actually knowing what each function accepts/returns is like being able to make up interfaces out of thin air and slapping them onto any object that happens to comply with it already, giving you the safety of typing with the flexibility of being able to do whatever the fuck you want

that makes no fucking sense
>>
14, I think.
I could see why you would want it in a small (< 500 LOC) script, but even for those, dynamic typing is obsolete now that modern statically typed languages infer types.

Enjoy subtly breaking your program with every tiny bit of refactoring, enjoy literally no autocompletion unless you annotate your types anyway (without gaining any of the other advantages) and enjoy looking up the documentation all the time because you just don't know what arguments functions take, especially functions that take fucking hashmaps with magic string keys (who needs enums?!) as configuration objects, enjoy figuring out what a getX function actually returns and what members that object has and enjoy trying to figure out what arguments a callback receives.
While you're busy loading the documentation and spending hours trying to find a subtle typo that any good language's tools would have caught immediately, we produce results.
>>
>>54533372
you don't have to care about what a given object is as when passing it to a function just as long as you know all the operations the function will want to run on that object happen to be supported already by whatever means.

Dynamic typing is only a problem when retards do shit like
Math.max(element.textContent, prompt("type something"))
without realizing those functions fucking return strings.
>>
>>54533418
this is true too, you can really only be productive in e.g. js if you are already familiar with the entire domain and its functions. If you're trying to work with a framework you're new to, you're gonna be doing more reading and cursing the framework devs than writing.
>>
I'm proud /g/ doesn't really get detailed by political shitposts as easily as some other boarda
>>
>>54531833
I'm starting to feel bad for Bernie supporters. It's like when that one dumb girl in class starts talking about her college applications even though you know she won't get in anywhere.
>>
>>54533451
Exactly. And this is where Typescript delivers. You just download the type definition file for the given framework and it just werks.
Don't remember the properties to pass to the jQuery.ajax config objects? Don't worry, they defined an interface for this for you.
>>
>>54533421

Int cast is hard. Dynamic int cast is easy.
>>
>>54533421
>you don't have to care about what a given object is as when passing it to a function just as long as you know all the operations the function will want to run on that object happen to be supported already by whatever means.
which provides no actual advantage over strong typing and loses all the advantages of strong typing.
>>
File: 1431834910480.gif (175 KB, 500x375) Image search: [Google]
1431834910480.gif
175 KB, 500x375
>>54531833
Oh my lord, Berniefags will never stop making me laugh.
Even if he beats Hillary he will be destroyed by Trump in the general election. I bet they are feelin the Bern by now.
>>
>>54533538
he won't beat shillary. He is polling better against trump than she is though
>>
>>54533421
>retards

For not knowing what a function returns in a dynamically typed language.

Hey I have a solution to this... use statically typed languages!
>>
>>54533497
That may seem that way, but it really isn't.

In a dynamically typed language, when you just convert some value to an int (unary + in JS, for example), it will do that without complaining - no matter how nonsensical it is. You will get nulls, 0s, undefineds, nils, NaNs, toString() called and the result being interpreted as a written-out jewish number or scientific notation...
You'll get a result, but it's usually not what you want and an easy way to sneak bugs into your program that will be a pain to get rid of later.

Meanwhile, in reasonable static-land, we just have functions that blow up our programs if it can't convert the value to an int using reasonable measures unless we actually handle that case.

Yes, it's not like you can't also do this in dynashit, but once again, it doesn't provide any advantage and instead encourages you to write broken code.
>>
>>54533464
The only logic that's made sense is "The superdelegates haven't actually voted yet" but I'm not sure how much truth there is to that
>>
>>54533548
>He is polling better against trump than she is though

That's because he hasn't had 6 months of Trump calling him a pinko commie draft dodging traitor on national television. I wish Bernie won because the attack ads would be amazing and Bernie would lose in a landslide.
>>
>>54533623
Their logic is that they only need to win in pledged delegates and the superdelegates will follow.
>>
>>54533714
you're probably right. he also cucked himself pretty hard by basically not attacking shillary at all despite her various crimes/lies/fuck ups. I don't even care at this point, we're fucked regardless.
>>
>>54533714
>pinko commie draft dodging traitor
Had McCain been running against Sanders, he could pull the draft dodger card and win. But Trump? He's a draft dodger too.
>>
>>54531833
How old were you when you realized reddit blog posters are retarded and should kill themselves? I was 1 second old.
>>
>>54533841
No he isn't retard, his draft number wad never even pulled
>>
>>54531833
Of course dynamic typing is bad it can lead to runtime errors... so scary...

Ah yes I will just pass my List<Hashmap<void *,List<Tuple<Vector<int>,string>>>> to map with it's signature of ...
Ah fuck I lost track of what I was doing.
>>
What the fuck is dynamic typing
>>
>>54534522
Python vs C
>>
>>54534498
> List<Hashmap<void *,List<Tuple<Vector<int>,string>>>>
Sounds like a problem with your abstraction. If I find myself creating functions that take List<List<List<T>>> then I create a new class
>>54531833
I really like how easy it is to do things in Python however it's a pain not always having autocomplete because the "compiler" has no way to determine what type I intend something to be. i'm becoming converted to static typing
>>
>>54533418
>need autocomplete

I guess you are either underage or undergrad whom programming experience only come from school assignments.
>>
>>54533609
>In a dynamically typed language, when you just convert some value to an int (unary + in JS, for example), it will do that without complaining - no matter how nonsensical it is. You will get nulls, 0s, undefineds, nils, NaNs, toString() called and the result being interpreted as a written-out jewish number or scientific notation...

that's just javascript fucking fault, and you are confusing weak type with dynamic typing, which are totally different things.

Shut the fuck up and learn CS properly, retard.
>>
>>54535067
And I guess you never worked with a framework or an API
>>
>>54535067
found the notepad programmer. having fun churning out 10 LOC a day?
>>
>>54535163
>>54535182

because rails was never a thing, right.
Thread replies: 33
Thread images: 2

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.