27 karma · joined Jul 1, 2008 (18y ago) · 6 submissions
comment 18y ago · link · parent
I also think it is funny the status quo in language design is to effectively combine objects and functions but programmers and writers are not acknowledging this fusion. Ocaml, Javascript, F#, Scala, Ruby, Nemerle ... with varying ease, these languages all let you create lambdas, compose functions, functions as values. Even mainstream languages like C# and Java are awkwardly moving in this direction.
Scala does some crazy stuff to make "fusion" interesting. They allow objects in pattern matching by providing a specific mechanism for allowing an object to expose encapsulated behavior (extractors). Functions all belong to a parametric set of classes and have an "apply" method e.g. def add(x:Int,y:Int) = x+y is really Function2[Int,Int,Int]{ def apply(x:Int,y:Int):Int = x + y }. Likewise, any class or singleton object can invoked as a function by providing an "apply" method implementation.
comment 18y ago · link · parent
comment 18y ago · link · parent
comment 18y ago · link · parent
The Constitution is our Contract with the Government, and the Judicial Branch our process. Writing your Representative helps, but giving to lawyers who fight and defend the Constitution from overreaching/overreacting Government Officials is equally important and extremely patriotic IMO.
comment 18y ago · link · parent
comment 18y ago · link · parent