Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Using Global Variables

Name: Anonymous 2010-12-26 13:42

... in a Library is worse than murder.

Satan himself will arise from the depths of Oblivion to tear apart your soul for that.

Name: Anonymous 2010-12-26 14:04

>>1
What about using a language with a decent module system?
#lang racket/load
(module a racket
   (provide set!-d get-d)
   (define d 2)
   (define (set!-d x) (set! d 2))
   (define (get-d) d))
(require 'a)
(get-d) ; => 2
(set!-d 3) ; d = 3
(get-d) ; => 3
d ; Unbound variable


(in before "eww parens" and "lol toy language", Racket's not the only language with non-crappy modules (Python's is pure _shit))

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List