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

Why C/C++ for system programming?

Name: Anonymous 2012-03-08 5:18

It is unsafe, verbose and not particularly fast. Why I'm writing much more readable code with Lisp, using the same API?

Lisp:

(defun folder-p (path) (w/opendir (dir path) (not (null-pointer-p dir))))
(defun file-p (path)
  (unless (folder-p path)
    (w/fopen (f path "r")
      (not (null-pointer-p f)))))


C/C++:

int folderP(char *Name) {
  DIR *Dir;
  struct dirent *Ent;
  if(!(Dir = opendir(Name))) return 0;
  closedir(Dir);
  return 1;
}

int fileP(char *Name) {
  FILE *F;
  if (folderP(Name)) return 0;
  F = fopen(Name, "r");
  unless (F) return 0;
  fclose (F);
  return 1;
}

Name: Anonymous 2012-03-08 12:34

>>14
I thought dealing with hardware was the definition of systems programming. Are we all sucking the cock of the Google Goverlords now? Guess it's time to take down the GJS pinups on my ceiling and pucker up for Pike and Thompson.

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