Logo
Explore Mail Help
Register Sign In
Mirror/wren
1
0
Fork 1
You've already forked wren
mirror of https://github.com/wren-lang/wren.git synced 2026-01-18 13:49:59 +01:00
Code Issues Packages Projects Releases Wiki Activity
Files
2e83f056c1fc10c87aaceacae7396441e625d90e
wren/example/import-module/lovecraft.wren

9 lines
135 B
Plaintext
Raw Normal View History

add simple example for importing a module
2015-02-18 11:39:31 -05:00
import "cthulu" for Cthulu
class Lovecraft {
No more default constructors. Fixes #296.
2015-09-01 08:16:04 -07:00
construct new() {}
Make constructors just methods. * Eliminate "new" reserved word. * Allow "this" before a method definition to define a constructor. * Only create a default constructor for classes that don't define one.
2015-07-10 09:18:22 -07:00
say() { Cthulu.new().message }
add simple example for importing a module
2015-02-18 11:39:31 -05:00
}
Make constructors just methods. * Eliminate "new" reserved word. * Allow "this" before a method definition to define a constructor. * Only create a default constructor for classes that don't define one.
2015-07-10 09:18:22 -07:00
IO.print(Lovecraft.new().say())
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.0 Page: 50ms Template: 4ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API