Settings

Theme

I tried to an object-oriented program (C#) in a non-OOP language (Go) [video]

youtube.com

2 points by hazelnut-tree 2 years ago · 1 comment

Reader

hazelnut-treeOP 2 years ago

Video description:

> How can you create a class hierarchy in a language that doesn’t have classes? The Go (Golang) language doesn’t have classes and doesn’t do inheritance so when I tried to write an adventure game in Go, it looked as though I wouldn’t be able to get very far.

> I’ve previously written adventure game sin object oriented languages such as Java and C#. In those languages I can create class hierarchies in which one class (say a Room) inherits the features of another class (say Thing) and adds on any new features. Go doesn’t let me do that……or does it?

> In this video, I show how I created a ‘class hierarchy’ in Go even though it doesn’t have classes and so, in principle, it shouldn’t be possible to create a class hierarchy.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection