Skip to content

Instantly share code, notes, and snippets.

'use strict';
var React = require('react-native');
var {
Bundler,
StyleSheet,
Text,
TouchableHighlight,
View,
ScrollView,
@ziadoz
ziadoz / meta-programming.php
Created July 17, 2012 03:35
Basic Meta Programming with PHP 5.4
<?php
trait MetaClass
{
protected $__classMethods = array();
static protected $__staticMethods = array();
public function __call($name, $args)
{
@joseraya
joseraya / core_test.clj
Created June 8, 2012 12:33
Encapsulation in clojure
(ns encapsulation.core-test
(:use midje.sweet)
(:require [clj-time.core :as time]))
;My point here is to show how we can achieve encapsulation in clojure
;I assume that we may need encapsulation for two purposes:
; - Hide the internal representation of data (so that it can change)
; - Ensure the consistency of the data (by applying integrity constraints)
;Let's say that we have a "class" Person with an age.