THE COBRA PROGRAMMING LANGUAGE
At SoCal Code Camp January 2009 cobra-language.com
1
THE COBRA PROGRAMMING LANGUAGE At SoCal Code Camp January 2009 - - PowerPoint PPT Presentation
THE COBRA PROGRAMMING LANGUAGE At SoCal Code Camp January 2009 cobra-language.com 1 YOUR SPEAKER Chuck Nor^H^H^H Esterbrook AKA Cobra Commander Independent contractor / consultant Based in Los Angeles
1
2
3
4
5
6
7
def nodeFor(name as String) as Node? def nodeFor(name as String?) as Node?
8
9
def add(a as int, b as int) as int def add(a, b) as dynamic
10
def add(a, b) as dynamic return a + b
11
def nodeFor(name as String) as INode?
12
13
14
def nodeFor(name as String) as INode? require name.length ensure result.name.toLower == name.toLower ...
15
def capped(s as String) as String is shared test assert Utils.capped(‘aoeu’) == ‘Aoeu’ assert Utils.capped(‘’) == ‘’ expect NullArgumentException Utils.capped(nil) # ahem body ...
16
17
18
19
20
21
22
23
24
25
26
27
28
def foo(thing) require thing responds to (get name as String)
29
30
31
32
33