lookin at the dartlang documentation rn and

i'm not sure why these kinds of tutorials like to say "you can do this thing in our language, unlike in javascript!" about things you can 100% do in javascript?

@00dani without context i would guess that this is saying dartlang does expose a round method but in js you have to do it yourself? but if that's the case it's worded strangely. like weirdly adversarial

Follow

@monorail @00dani one potential difference is that numbers in javascript are (for good reason) immutable

even if you attach a method to them it can't modify the original value

is that true in dart?

@monorail @00dani because "numbers are class instances" to me suggests "numbers are mutable" which :blobmeow_sweat:

@Lady @monorail nah, numbers are specifically immutable class instances. value objects

same deal in ruby and other "everything is an object" languages i'm pretty sure

@00dani @Lady yeah i inherited from int in python once and had to figure out the difference between __init__ and __new__ real quick lmao

Sign in to participate in the conversation
📟🐱 GlitchCat

A small, community‐oriented Mastodon‐compatible Fediverse (GlitchSoc) instance managed as a joint venture between the cat and KIBI families.