ooc - A hybrid language experiment

download ooc - A hybrid language experiment

If you can't read please download the document

Transcript of ooc - A hybrid language experiment

  • 1. ooc A hybrid language experiment

2. Why?

  • Software sucks
  • It's unreliable

3. It's slow 4. It's too hard to develop 5. It's not modular enough 6. [insert rant here] The quality of a piece of software is inversely proportional to its popularity. Buchheit's law 7. Why?

  • The fate of popular software

8. Why?

  • Languages suck

void(* signal ( int ,void(* fp )( int )))( int ); 9. Why?

  • Languages suck

void(* signal ( int ,void(* fp )( int )))( int ); signal :Func ( Int ,Func ( Int )) ->Func ( Int ) 10. Why?

  • Tools suck

small.cpp(17) : error C2664: 'class std::_Tree,class std::allocator >,struct std::pair,class std::allocator >const ,int>,struct std::multimap,class std::allocator >,int,struct std::less,class std::allocator > >,class std::allocator >::_Kfn,struct std::less,class std::allocator > >,class std::allocator > ::iterator __thiscall std::multimap,class std::allocator >,int,struct std::less,class std::allocator > >,class std::allocator >::insert(const struct std::pair,class std::allocator > const ,int> &)' : cannot convert parameter 1 from 'const int' to 'const struct std::pair,class std::allocator > const ,int> &'Reason: cannot convert from 'const int' to 'const struct std::pair,class std::allocator const ,int>'No constructor could take the source type, or constructor overload resolution was ambiguous 11. Why?

  • Tools suck
  • GNU autoconf, automake, autoreconf masochism

12. GNU ld the kitchen sink of linkers 13. GNU make the brainless servant Bad workers blame the tool

  • What if good workers do too?

14. Break with tradition 15. Why?

  • School assignment in C laziness.
  • 4 months later ooc 0.1

16. Version 1 Sucks, But Ship It Anyway J. Atwood

  • Finding a purpose
  • To remove obstacles

17. To encourage experimentation 18. To minimize frustration 19. What?

  • Classes, abstract, single inheritance, virtual by default

20. Garbage collection (Boehm, opt-out) 21. Covers, function overloading 22. Partial type inference, more type-checking 23. Arrays, pointers, manual memory management 24. Generic functions, generic classes, collections 25. Interfaces, operator overloading, properties 26. Closures, first-class functions, map/filter/reduce 27. What?

  • I was gonna describe the syntax here

28. But we're short on schedule so I'll just sum it up: 29. ooc syntax isJava without bullshit - Anonymous 30. I'm sorry if you were offended. 31. Java offends me too. 32. Design principles

  • Build upon, extend, divide and conquer

33. Re-use what makes sense, rewrite the rest as we go 34. JDK an example of how NOT to do modularity 35. SDK all you need to get started, easy to swap out 36. Dependency management made easy 37. Making it easy to use libs encourages good design 38. Acronym fair

  • DRY

39. KISS 40. IYFF 41. YAGNI 42. RTFM RTFC 43. TMTOWTDI 44. Paradigm City

  • Procedural

println("Is i+=1 deterministic?") 45. Paradigm City

  • Object-oriented

Window new("Vista"). add( Button new("Buy"). connect("clicked", || "Seriously?" println() ) ). showAll() 46. Paradigm City

  • Generic programming Cell:class { data: T next: This init:func(=data) {} } c := Cell new(42)

47. Paradigm City

  • Functional

(1..100) map(|x| x*x) reduce(|a, b| a+b) 48. Paradigm City

  • Preemptive multi-threading

mutex := Mutex new() Thread new(|| mutex lock() // prove Fermat's last theorem mutex unlock() ) start() 49. Paradigm City

  • Communicating Sequential Processes

chan := make(Int) go(|| chan