What exactly is wrong with duck typing?

What exactly is wrong with duck typing?

Other urls found in this thread:

youtube.com/watch?v=mENSZw01c_8
en.wikipedia.org/wiki/Structural_type_system
grammar.ccc.commnet.edu/GRAMMAR/
twitter.com/NSFWRedditGif

Wrong board

>programming languages are off-topic

Trades safety for short-term convenience.

The way Go does interfaces deprecates it.

absolutely nothing

I like to think of it as the language getting off your dick

you can just do whatever you want

You guys realize OP is a degenerate homosexual right?

>cuck typing
FTFY OPFaggu

>xD le macbook meme
>xD le degenerate meme

this lmao

>unironically making fun of ironic memes that involve unironic faggottry

It's not a meme though. I'm gay and own apple products, my friends are the same. We all like to blow each other in the weekends while playing U2 songs on our macbooks.

>What exactly is wrong with cuck typing?

Circumstantial. I'm gay and I've never owned a Mac product. My friends and I don't even blow each other on the weekends because we're too busy fixing our broken Arch updates.

Nothing. If your project is large enough that duck typing would legitimately make it more difficult to debug, it is too large for a slower language like Python or Ruby in the first place.

>or Ruby in the first place.
You wanna get shot son?

...

Am I the only one whose developed a weird hybrid typing style? I predominantly only use my pointer and index finger, but I reach my hand all around the keyboard to type.

It's pretty efficient too, I'm no pro typist but I can crack 60wpm if I'm familiar with the keyboard. Haptically, the use of the thumbs, vestigial finger and pinky is retarded and handicaps dexterity.

>60wpm
lmao

Sometimes doing whatever you want is a good thing, sometimes it's a bad thing.
Static typing has a lot of advantages; safety (can provide a type that doesn't implement the interface), compiler optimizations (methods are known at compile time, can be inlined, etc.), better tooling (the IDE can determine the names and signatures of the methods).
Dynamic typing pretty much just insures that none of the above can be guaranteed.

From the thumbnail I though that duck was going into a spinning fan

>pointer and index finger

It's slow

Do you hold ctrl while typing? :^)

fucking love ducks
youtube.com/watch?v=mENSZw01c_8

yo who is that
he looks familiar

Structural typing is more weakly typed than nominal typing.
For some cases, this is a good thing, and for some cases, this is a bad thing.

Languages like Python or Ruby are not the only languages with structural typing.

This has nothing to do with static vs. dynamic typing.

It makes code completion without running code more difficult since you don't know the type of an object until runtime.

Similarly you cant perform certain optimizations until runtime unless you know the type of the object.

>xD le reddit refugee

Were you disappoint?

How can a duck type?

I know I was

Kek

This, I work on a 500k LOC rails project, makes new hires get started on the project really slow, especially if they're edgy neckbeards that refuse to use a decent ide like Rubymine. Stuff like duck typing and monkey patching are OK if you're a small team on a small project.

>Go invented anything new.

Type errors can propagate far away from where they were caused. It's the same problem that null references have.

More ducklings please.

>judging people on their choice in computers
>using homophobic insults
>2016

WE DEMAND MORE DUCKS

It isnt a duck if it isnt a duck.
I dont give a fuck if it looks, walks and sounds like one.

this thread is about typing as in data type management

>2016
bait?

it's okay, but it's still dynamic typing. structural subtyping is essentially the same thing but static so there's usually no reason to use duck typing.
>Structural typing is more weakly typed than nominal typing
wrong. it encodes more type information than nominal typing. neither one is necessarily stronger than the other though. there are different axes on which type systems can be compared.

where do you even get a duck?

Hah, calling people faggots is standard procedure on Sup Forums. Newfag detected.

Being a "faggot" is not congruent with homosexuality.

there are dozens of ducks outside my apartment complex that live here
feed store is an option

not that hard

Duck typing allows a language like Ruby to use its OO more like functional programming because object behavior is not constrained to the class definition and so objects can have methods added to it at runtime giving it very dynamic behavior. This is why Ruby is compared to Smalltalk, Alan Kay has always said that Smalltalk is not an object oriented language, that its based on message passing and that objects themselves should not have static types.

>non lad here
isn't index finger basically a pointer

Everytime you post talking like you know shit about anything, I feel like punching you in the face repeatedly until you say, bleeding from your mouth "I'm just a dumb tripfag and I don't know shit. I'm only in it to boost my bloated ego because I was raped as a child! I'm sorry Sup Forums!".

cuck typing

It is here now fuck off

expected gore

There's a webm of male ducklings (not the one with the chicks) getting shredded to pieces by some machine. I was expecting that but sadly it wasn't the case.

If only ducks didn't shit so much and so often, they'd make great pets. I have a cockatiel and I can barely deal with his relatively tiny shits.

...

do you guys just not realize that you sound autistic as fuck when you say "degenerate"

Duck typing is the future when type are checked at compile time
en.wikipedia.org/wiki/Structural_type_system

That's literally against the definition of duck typing.

No it's literally an example of duck typing.
>If it's quack like a duck it's a duck
That exactly what structural type system does.

You should work on your grammar and punctuation.
grammar.ccc.commnet.edu/GRAMMAR/