ProyectoFinal2015 / wollok

Wollok Programming Language
0 stars 0 forks source link

Think of a way to avoid instantiating Position class #30

Closed javierfernandes closed 8 years ago

javierfernandes commented 8 years ago

Currently to use wollok game you need to instantiate the Position class.

new Position(3, 3).drawCharacterWithReferences(granjero, #["oro", "cultivos"])

We want to avoid showing classes in the first part of the OOP learning-path. So we should think of a way to avoid it. It could be with a new feature in wollok language itself like extension methods or literals.

Example using a literal

(3 : 3).drawCharacterWithReferences(granjero, #["oro", "cultivos"])

Although I don't like to couple the language syntax with wollok game. Another option more object-based without any feature

game.at(3, 3).drawCharacterWithReferences(granjero, #["oro", "cultivos"])
PalumboN commented 8 years ago

I agree. The last version is ok for me!

javierfernandes commented 8 years ago

Moving to https://github.com/uqbar-project/wollok/issues/478