uqbar-project / wollok

Wollok Programming Language
GNU General Public License v3.0
60 stars 16 forks source link

Change default example when creating a new project #869

Closed PalumboN closed 5 years ago

PalumboN commented 8 years ago

When you create a new Wollok Project it creates an example.wlk with

/**
 * This is an example wollok hello world
 */
object ex {
    method sayHi(){
        console.println('Hello Wollok!')
    }
}

I don't like that, because:

I prefer an object with an attribute, a "question" method and an "action" method. Like:

object pepita {
    var energia = 100

    method energia() = energia

    method volar(kms) {
        energia -= kms + 10
    }
}
npasserini commented 8 years ago

+1

On Sat, Jul 30, 2016 at 8:32 PM, Nahuel Palumbo notifications@github.com wrote:

When you create a new Wollok Project it's create an example.wlk with

/* * This is an example wollok hello world / object ex { method sayHi(){ console.println('Hello Wollok!') } }

I don't like that, because:

  • ex is less expressive
  • I don't want a first program with console.println, because it not represent the paradigm's ideas for me.

I prefer an object with an attribute, a "question" method and an "action" method. Like:

object pepita { var energia = 100

method energia() = energia

method volar(kms) {
    energia -= kms + 10
}

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/uqbar-project/wollok/issues/869, or mute the thread https://github.com/notifications/unsubscribe-auth/AEa1OVlyw38rkbNidlJQlxlRV5eviRM0ks5qa5i9gaJpZM4JY3YV .

lspigariol commented 8 years ago

+1
but in the first example, dont like use = for return and -= for assign and send message at the some time.

tener ejemplo es útil para los primeros proyectos, después es molesto. Incluso cuando se importa un proyecto usando el asistente, lo agrega de prepo. ¿por que no poner por defecto un proyecto (o varios) con ejemplos sencillos (o de complejidad creciente) pero que cuando se crea uno nuevo aparezca vacío?

javierfernandes commented 8 years ago

Eclipse has a way to introduce examples and help. Many plugins support this so for example besides the options in the wizard to create a new object / program, there could be a folder "Wollok Examples" with a list like "Pepita", "Pepe's salary" (?) etc. When selected that will import this example project into the workspace.

I agree that it could be annoying if you need to delete all this code every time

2016-08-01 9:26 GMT-03:00 lspigariol notifications@github.com:

+1

but in the first example, dont like use = for return and -= for assign and send message at the some time.

tener ejemplo es útil para los primeros proyectos, después es molesto. Incluso cuando se importa un proyecto usando el asistente, lo agrega de prepo. ¿por que no poner por defecto un proyecto (o varios) con ejemplos sencillos (o de complejidad creciente) pero que cuando se crea uno nuevo aparezca vacío?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/uqbar-project/wollok/issues/869#issuecomment-236566777, or mute the thread https://github.com/notifications/unsubscribe-auth/AEORWKoykqjyJoW4Lp-gpiXBj0kPRUIWks5qbeX8gaJpZM4JY3YV .

lgassman commented 8 years ago

In my opinion, it is enough to change console.println('Hello Wollok!') to return 'Hello Wollok!'

npasserini commented 8 years ago

I would just forget about println and also hello world. If you look at the old wollok site, there was a carefully thought and well documented pepita-based introductory path which does not need any of theese. I think that didn't make it to the new site, but the old one might be accessible.

On Thu, Aug 18, 2016 at 6:14 PM, Leo Gassman notifications@github.com wrote:

In my opinion, it is enough to change console.println('Hello Wollok!') for return 'Hello Wollok!'

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/uqbar-project/wollok/issues/869#issuecomment-240774832, or mute the thread https://github.com/notifications/unsubscribe-auth/AEa1OUY-6FM1D8ZNThsoEQL3_ouUKo7lks5qhITggaJpZM4JY3YV .

fdodino commented 5 years ago

@npasserini @PalumboN creo que este issue es sencillo, hoy devuelve un string "I am Wolloktastic!" que para mí no es tan intrusivo como un ejemplo completo que la cuarta vez que creás un objeto es incómodo para borrar. Lo dejo en discussion.

lspigariol commented 5 years ago

Tal vez sea interesante que haya codigo de ejemplo en proyectos que ya vengan en el workspace al instalar wollok, mas que al crear nuevo proyecto.

El dom., 5 may. 2019 a las 22:38, Fernando Dodino (notifications@github.com) escribió:

@npasserini https://github.com/npasserini @PalumboN https://github.com/PalumboN creo que este issue es sencillo, hoy devuelve un string "I am Wolloktastic!" que para mí no es tan intrusivo como un ejemplo completo que la cuarta vez que creás un objeto es incómodo para borrar. Lo dejo en discussion.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/uqbar-project/wollok/issues/869#issuecomment-489482055, or mute the thread https://github.com/notifications/unsubscribe-auth/ACZRXG5AZPZIEAJ44EAWC2LPT6D3FANCNFSM4CLDOYKQ .

npasserini commented 5 years ago

Eso parece más complejo de implementar.

El lun., 6 de may. de 2019 a la(s) 12:42, Lucas Spigariol ( notifications@github.com) escribió:

Tal vez sea interesante que haya codigo de ejemplo en proyectos que ya vengan en el workspace al instalar wollok, mas que al crear nuevo proyecto.

El dom., 5 may. 2019 a las 22:38, Fernando Dodino (< notifications@github.com>) escribió:

@npasserini https://github.com/npasserini @PalumboN https://github.com/PalumboN creo que este issue es sencillo, hoy devuelve un string "I am Wolloktastic!" que para mí no es tan intrusivo como un ejemplo completo que la cuarta vez que creás un objeto es incómodo para borrar. Lo dejo en discussion.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub < https://github.com/uqbar-project/wollok/issues/869#issuecomment-489482055 , or mute the thread < https://github.com/notifications/unsubscribe-auth/ACZRXG5AZPZIEAJ44EAWC2LPT6D3FANCNFSM4CLDOYKQ

.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/uqbar-project/wollok/issues/869#issuecomment-489668219, or mute the thread https://github.com/notifications/unsubscribe-auth/ABDLKOJJSVK3TESZGIHJTLTPUBGWJANCNFSM4CLDOYKQ .

fdodino commented 5 years ago

Cierro el issue, creo que para hacer lo que pide Lucas necesitamos pensar en una vuelta de tuerca y ya que vamos a modificar nuestra arquitectura y no basarla tanto en Eclipse no me parece que convenga invertir tiempo (además los alumnos no tienen mayores problemas para insertarse en el IDE)