Show newer

@vaporeon_ @wallhackio typing based on structure rather than inheritance—“if it has these methods with the purropurr type signatures, then it is one of these”

go calls this a “protocol”. it’s kind of like java interfaces but without ever having to explicitly declare that you are implementing one

@vaporeon_ @wallhackio the type system is more expurressive and notably suppurrts a natural way of expurressing duck typing (i do think some type expurressions look kinda bad to read though)

compilation is quite fast (dealing with very slow C++ compile times was one of the major motivators fur creating the language)

concurrency is a furst class feature and apparently fairly intuitive to work with

@vaporeon_ @wallhackio if you purrogram enough with pass-by-refurence languages you just get used to it :blobmeow_shrug:

@wallhackio @vaporeon_ yeah you don’t have pointer arithmetic at all in js. basically all implementations are using pointers under the hood and just not allowing the purrogrammer to manipulate the address they point to

@vaporeon_ @wallhackio

const o = { k: 1 };

function changeObj(o) {
o.k = 2
};

changeObj(o);
console.log(o); // { k: 2 }

javascript wonkery 

@wallhackio @vaporeon_ fur the record, the following alternative implementation is subtly but meaningfully diffurent:

const deleteThis = function() {
const temp = { _this: this };
delete temp._this;
};

arrow functions and functions defined with the function keyword have intentionally diffurent rules about resolving this

Show older
📟🐱 GlitchCat

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