mdtrooper
Joined 5 years ago
Joined 5 years ago
Here's the tutorial
https://docs.godotengine.org/en/4.4/tutorials/editor/command...
History is cyclical. Because I remember same situations m$ windows released features years after the same feature in GNU/Linux, or Iphon€ vs android.
I remember the book of https://en.wikipedia.org/wiki/Henry_Darger or https://en.wikipedia.org/wiki/Dwarf_Fortress or Cataclysm DDA .
And weird games as https://en.wikipedia.org/wiki/Nomic .
type Dog = { bark: () => void }
type Cat = { meow: () => void }
function speak(animal: Dog | Cat) {
if (‘bark’ in animal) {
animal.bark();
} else {
animal.meow();
}
}Okay, okay, I know you can filter using ‘in’ to see if it has methods, but in real life, in a company where you have a colleague (who is a golden boy) who writes over-engineered code with hundreds of interfaces of interfaces, you don’t want to spend time searching through the files to find every element that is in the union type.
Whereas in Rust it does:
struct Dog { name: String, }
struct Cat { name: String, }
enum Animal {
Dog(Dog),
Cat(Cat),
}fn process_animal(animal: Animal) {
match animal {
Animal::Dog(dog) => {
println!(‘It is a dog named {}’, dog.name);
}
Animal::Cat(cat) => {
println!(‘It is a cat named {}’, cat.name);
}
}
}I think TypeScript should add a couple of lines of code to the generated JavaScript to do something like:
type Dog = { bark: () => void }
type Cat = { meow: () => void }
function speak(animal: Dog | Cat) {
if (animal is Dog) {
animal.bark();
} else {
animal.meow();
}
}https://store.steampowered.com/app/4181930/Idle_Defragmenter...
But all of them need one step, free assets under Creative Commons or similar licenses).
I remember the big change of OpenTTD when it became finally all free software.
I wish to know Blender3D to help this projects, but I am a regular IT guy.