"but operator overloading makes your code confusing"

ok bro literally what is this Image
"people can misuse it"

oh no what if people make a "GlorbAllNoots()" function that florps all goobers instead??

looks like we can't have functions either, look at this confusing and hidden implicit behavior!!
I just don't see how:

vec2.add(vec2.mul(a,1-t),vec2.mul(b,t))

or

a.mul(1-t).add(b.mul(t))

is more readable/better than:

a*(t-1)+b*t

doing math heavy projects without operator overloading is an absolute nightmare
"what about the cross product that was confusingly defined in this one codebase"

yeah then just don't define operators in ambiguous cases like that? functions still exist, they're not mutually exclusive

the possibility of using a feature in bad ways doesn't make the feature bad

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Freya Holmér

Freya Holmér Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @FreyaHolmer

17 Oct
for the past three years, I've been speaking english every single day, only switching to my native swedish when talking to relatives on the phone, which is probably 0.5% of my uttered words

somehow, I now feel like a stranger to my own native language
I recently met a new friend - we'd never spoken in person before!

once we met we figured we might as well just speak swedish since we both speak it fluently

but, my brain kept wanting to pull in english words, and started structuring sentences as if I was speaking english
the result is a haphazard mostly-swedish but lots of english words and unfinished sentences

like it works, but something feels really off, like I'm emulating someone else, trying to fit a mold that's just ever so slightly off at all times
Read 4 tweets
15 Oct
how do you make websites these days?

I'm a Lv1 webdev right now (vanilla html/js/php), but I'm looking to modernize just one step further to Lv2 without getting overwhelmed with the package/API/systems hell of the Lv8 lategame
one of the biggest things I'm missing is some form of html templating

I used to do it w. php but it seems like such a hack, and doing it with js also seems like a hack. you have to like, name containers and use .innerHTML

I feel like there has to be a better way?
I don't even need any advanced dynamic content, I just need some better workflow to share data

the most advanced thing I have is like, embedding interactive p5js stuff, but that's already solved
Read 4 tweets
4 Oct
the axis-angle representation of 3D rotation

a single 3D vector, where
• its direction v̂ is the axis of rotation
• its magnitude ||v|| is the angle to rotate by
this can represent any 3D rotation, but you'll most commonly see it represent angular velocity, where the magnitude is the angular speed

this is because unlike quaternions, axis-angle can go beyond a full turn, just like a number representing a single angle can
when representing angular velocity this way, you can also easily add angular velocities together through simple vector addition, decompose it, and project it!

which is pretty neat if you ask me
Read 12 tweets
3 Oct
I feel like so many movies would immediately improve if you removed 80% of dialogue and made it 4 times as long
make me *feel* the character's motivation, and see their struggles and motivations

I'm so allergic to having it told to me over and over through dialogue when it's already clear contextually
and like, it's so hard to have proper pacing and tell a believable story with actual character development, without too much on the nose exposition, in the space of an hour or two
Read 4 tweets
2 Oct
it's just extremely sus that the only people excited about NFTs are very rich famous people, large tech companies, and cryptobros,

while artists themselves are unanimously against the idea

like shouldn't this raise a huge number of red flags?
if twitter truly cared about artists they could help us with two very simple features:

1. let us preview and edit the thumbnail crop region
2. let us tag individual media as nsfw so people can opt out/not be scared of following people who do both sfw and nsfw art

like that's it
also yes of course there are exceptions, some artists are on board with nfts, I know, but they seem to exist as an extremely small minority, that's what I mean by unanimous

so pls stop with the "not all artists" replies now thx <3
Read 10 tweets
11 Sep
btw these large scary math symbols are just for-loops
dw game dev math mommy's got u ❤
math people interacting with this tweet are just now realizing how little math knowledge game devs and engineers can get by with
Read 13 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!

:(