Benutzer:Oneup/ProgrammingLanguage: Unterschied zwischen den Versionen
aus Metalab Wiki, dem offenen Zentrum für meta-disziplinäre Magier und technisch-kreative Enthusiasten.
Zur Navigation springenZur Suche springenOneup (Diskussion | Beiträge) (Die Seite wurde neu angelegt: i suppose programming languages are pretty perfect nowadays, we could live better though. most things that should have been implemented have been. <code> class "Foo" ...) |
Oneup (Diskussion | Beiträge) |
||
Zeile 3: | Zeile 3: | ||
<code> | <code> | ||
− | class "Foo" | + | class "Foo" |
− | + | def "say_what" | |
− | + | "hello my name is" | |
+ | |||
+ | def "greet" someone | ||
+ | "y0! #someone" | ||
− | def " | + | def "foo" Foo.new |
− | " | + | # or |
+ | set "a" Foo.new | ||
− | + | users = words (peter, paul, mary, joe) | |
− | + | users.each u | |
− | + | print u | |
− | + | users_with_p = users.collect( u, (u.starts_with "p")) | |
− | + | users_with_p = users.collect (starts_with "p") # higher order messaging | |
− | |||
− | |||
− | users_with_p = users.collect( u, (u.starts_with "p")) | ||
− | users_with_p = users.collect (starts_with "p") # higher order messaging | ||
</code> | </code> | ||
# i wanted to iterate onwards from this since the beginning, **i should have shared my thoughts with others to explore this properly** | # i wanted to iterate onwards from this since the beginning, **i should have shared my thoughts with others to explore this properly** | ||
# close to ruby's syntax, but powerful meta programming | # close to ruby's syntax, but powerful meta programming | ||
+ | |||
+ | |||
+ | maybe all in all the lesson here was: | ||
+ | |||
+ | be an engineer, too much hacking breaks things. |
Version vom 11. August 2009, 12:47 Uhr
i suppose programming languages are pretty perfect nowadays, we could live better though. most things that should have been implemented have been.
class "Foo"
def "say_what"
"hello my name is"
def "greet" someone
"y0! #someone"
def "foo" Foo.new
# or
set "a" Foo.new
users = words (peter, paul, mary, joe)
users.each u
print u
users_with_p = users.collect( u, (u.starts_with "p"))
users_with_p = users.collect (starts_with "p") # higher order messaging
- i wanted to iterate onwards from this since the beginning, **i should have shared my thoughts with others to explore this properly**
- close to ruby's syntax, but powerful meta programming
maybe all in all the lesson here was:
be an engineer, too much hacking breaks things.